Package com.yahoo.document
Class MapDataType
- java.lang.Object
-
- com.yahoo.vespa.objects.Selectable
-
- com.yahoo.vespa.objects.Identifiable
-
- com.yahoo.document.DataType
-
- com.yahoo.document.MapDataType
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<DataType>
public class MapDataType extends DataType
Represents a map type.- Author:
- vegardh
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MapDataType(DataType keyType, DataType valueType)
MapDataType(DataType keyType, DataType valueType, int id)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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 reflectionMapFieldValue
createFieldValue()
Creates a new, empty FieldValue of this typeDataType
getKeyType()
Class
getValueClass()
DataType
getValueType()
boolean
isMultivalue()
Returns whether this is a multivalue type, i.e either a CollectionDataType or a MapDataTypeboolean
isValueCompatible(FieldValue value)
protected void
register(DocumentTypeManager manager, List<DataType> seenTypes)
void
setKeyType(DataType keyType)
Deprecated, for removal: This API element is subject to removal in a future version.// TODO Vespa 8 removevoid
setValueType(DataType valueType)
Deprecated, for removal: This API element is subject to removal in a future version.// TODO Vespa 8 remove-
Methods inherited from class com.yahoo.document.DataType
compareTo, createFieldValue, equals, getArray, getCode, getId, getMap, getName, getPrimitiveType, getTensor, getWeightedSet, getWeightedSet, hashCode, isAssignableFrom, isRegistered, lastPredefinedDataTypeId, register, setId, setName, toString, visitMembers
-
-
-
-
Method Detail
-
clone
public MapDataType clone()
-
createByReflection
protected FieldValue createByReflection(Object arg)
Description copied from class:DataType
Creates a field value by reflection- Overrides:
createByReflection
in classDataType
- Parameters:
arg
- the value of the newly created field value- Returns:
- a fully constructed value
-
isValueCompatible
public boolean isValueCompatible(FieldValue value)
- Specified by:
isValueCompatible
in classDataType
-
getKeyType
public DataType getKeyType()
-
getValueType
public DataType getValueType()
-
setKeyType
@Deprecated(forRemoval=true, since="7") public void setKeyType(DataType keyType)
Deprecated, for removal: This API element is subject to removal in a future version.// TODO Vespa 8 removeWARNING! Do not use! Only to be used by config system! Sets the key type of this MapDataType.
-
setValueType
@Deprecated(forRemoval=true, since="7") public void setValueType(DataType valueType)
Deprecated, for removal: This API element is subject to removal in a future version.// TODO Vespa 8 removeWARNING! Do not use! Only to be used by config system! Sets the value type of this MapDataType.
-
createFieldValue
public MapFieldValue createFieldValue()
Description copied from class:DataType
Creates a new, empty FieldValue of this type- Specified by:
createFieldValue
in classDataType
-
getValueClass
public Class getValueClass()
- Specified by:
getValueClass
in classDataType
-
register
protected void register(DocumentTypeManager manager, List<DataType> seenTypes)
-
buildFieldPath
public static FieldPath buildFieldPath(String remainFieldName, DataType keyType, DataType valueType)
-
buildFieldPath
public FieldPath buildFieldPath(String remainFieldName)
Description copied from class:DataType
Creates a field path from the given field path string.- Overrides:
buildFieldPath
in classDataType
- Parameters:
remainFieldName
- a string containing the field path- Returns:
- Returns a valid field path, parsed from the string
-
isMultivalue
public boolean isMultivalue()
Description copied from class:DataType
Returns whether this is a multivalue type, i.e either a CollectionDataType or a MapDataType- Overrides:
isMultivalue
in classDataType
-
-