public class MapDataType extends DataType
Modifier and Type | Field and Description |
---|---|
private DataType |
keyType |
private DataType |
valueType |
Constructor and Description |
---|
MapDataType(DataType keyType,
DataType valueType) |
MapDataType(DataType keyType,
DataType valueType,
int id) |
Modifier and Type | Method and Description |
---|---|
FieldPath |
buildFieldPath(String remainFieldName)
Creates a field path from the given field path string.
|
static FieldPath |
buildFieldPath(String remainFieldName,
DataType keyType,
DataType valueType) |
MapDataType |
clone() |
protected FieldValue |
createByReflection(Object arg)
Creates a field value by reflection
|
MapFieldValue |
createFieldValue()
Creates a new, empty FieldValue of this type
|
DataType |
getKeyType() |
Class |
getValueClass() |
DataType |
getValueType() |
boolean |
isMultivalue()
Returns whether this is a multivalue type, i.e either a CollectionDataType or a MapDataType
|
boolean |
isValueCompatible(FieldValue value) |
protected void |
register(DocumentTypeManager manager,
List<DataType> seenTypes) |
void |
setKeyType(DataType keyType)
Sets the key type of this MapDataType. WARNING! Do not use! Only to be used by config system!
|
void |
setValueType(DataType valueType)
Sets the key type of this MapDataType. WARNING! Do not use! Only to be used by config system!
|
compareTo, createFieldValue, equals, getArray, getCode, getId, getMap, getName, getPrimitiveType, getTensor, getWeightedSet, getWeightedSet, hashCode, isAssignableFrom, isRegistered, lastPredefinedDataTypeId, register, setId, setName, setRegistered, skipDotInString, toString, visitMembers
public MapDataType clone()
protected FieldValue createByReflection(Object arg)
DataType
createByReflection
in class DataType
arg
- the value of the newly created field valuepublic boolean isValueCompatible(FieldValue value)
isValueCompatible
in class DataType
public DataType getKeyType()
public DataType getValueType()
public void setKeyType(DataType keyType)
public void setValueType(DataType valueType)
public MapFieldValue createFieldValue()
DataType
createFieldValue
in class DataType
public Class getValueClass()
getValueClass
in class DataType
protected void register(DocumentTypeManager manager, List<DataType> seenTypes)
public static FieldPath buildFieldPath(String remainFieldName, DataType keyType, DataType valueType)
public FieldPath buildFieldPath(String remainFieldName)
DataType
buildFieldPath
in class DataType
remainFieldName
- a string containing the field pathpublic boolean isMultivalue()
DataType
isMultivalue
in class DataType
Copyright © 2017. All rights reserved.