public class ObjectType extends AbstractType<ObjectType> implements DataType, Converter<Map<String,Object>>
| 构造器和说明 |
|---|
ObjectType() |
| 限定符和类型 | 方法和说明 |
|---|---|
ObjectType |
addProperty(String property,
DataType type) |
ObjectType |
addProperty(String property,
String name,
DataType type) |
ObjectType |
addPropertyMetadata(PropertyMetadata property) |
Map<String,Object> |
convert(Object value) |
com.alibaba.fastjson.JSONObject |
format(Object value)
对值进行格式化
|
String |
getId()
唯一标识别
|
String |
getName()
名称
|
List<PropertyMetadata> |
getProperties() |
Optional<PropertyMetadata> |
getProperty(String key) |
Map<String,Object> |
handle(Object value,
java.util.function.BiFunction<DataType,Object,Object> mapping) |
ValidateResult |
validate(Object value)
验证是否合法
|
description, expand, expand, expand, expandsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetExpands, getTypegetDescription, getExpand, setDescription, setExpands, setNamepublic ObjectType addPropertyMetadata(PropertyMetadata property)
public List<PropertyMetadata> getProperties()
public ObjectType addProperty(String property, DataType type)
public ObjectType addProperty(String property, String name, DataType type)
public ValidateResult validate(Object value)
DataTypepublic com.alibaba.fastjson.JSONObject format(Object value)
FormatSupportformat 在接口中 FormatSupportvalue - 值public Map<String,Object> handle(Object value, java.util.function.BiFunction<DataType,Object,Object> mapping)
public Optional<PropertyMetadata> getProperty(String key)
Copyright © 2019–2022. All rights reserved.