Package com.yahoo.document
Class WeightedSetDataType
- java.lang.Object
-
- com.yahoo.vespa.objects.Selectable
-
- com.yahoo.vespa.objects.Identifiable
-
- com.yahoo.document.DataType
-
- com.yahoo.document.CollectionDataType
-
- com.yahoo.document.WeightedSetDataType
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<DataType>
public class WeightedSetDataType extends CollectionDataType
- Author:
- Einar M R Rosenvinge
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WeightedSetDataType(DataType nestedType, boolean createIfNonExistent, boolean removeIfZero)
WeightedSetDataType(DataType nestedType, boolean createIfNonExistent, boolean removeIfZero, int id)
WeightedSetDataType(String typeName, int code, DataType nestedType, boolean createIfNonExistent, boolean removeIfZero)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldPath
buildFieldPath(String remainFieldName)
Creates a field path from the given field path string.WeightedSetDataType
clone()
WeightedSet
createFieldValue()
Creates a new, empty FieldValue of this typeboolean
createIfNonExistent()
Returns true if this has the property createIfNonExistent (only relevant for weighted sets)Class
getValueClass()
boolean
isTag()
Returns whether or not this is a tag type weighted set.boolean
removeIfZero()
Returns true if this has the property removeIfZero (only relevant for weighted sets)void
setTag(boolean tag)
Called by SD parser if a data type is explicitly tag.void
visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
-
Methods inherited from class com.yahoo.document.CollectionDataType
createByReflection, getNestedType, getPrimitiveType, isMultivalue, isValueCompatible, register, setNestedType
-
Methods inherited from class com.yahoo.document.DataType
compareTo, createFieldValue, equals, getArray, getCode, getId, getMap, getName, getTensor, getWeightedSet, getWeightedSet, hashCode, isAssignableFrom, isRegistered, lastPredefinedDataTypeId, register, setId, setName, toString
-
-
-
-
Constructor Detail
-
WeightedSetDataType
public WeightedSetDataType(DataType nestedType, boolean createIfNonExistent, boolean removeIfZero)
-
WeightedSetDataType
public WeightedSetDataType(DataType nestedType, boolean createIfNonExistent, boolean removeIfZero, int id)
-
WeightedSetDataType
@Deprecated public WeightedSetDataType(String typeName, int code, DataType nestedType, boolean createIfNonExistent, boolean removeIfZero)
Deprecated.
-
-
Method Detail
-
clone
public WeightedSetDataType clone()
- Overrides:
clone
in classCollectionDataType
-
setTag
public void setTag(boolean tag)
Called by SD parser if a data type is explicitly tag.- Parameters:
tag
- true if this is a tag set.
-
isTag
public boolean isTag()
Returns whether or not this is a tag type weighted set.- Returns:
- true if this is a tag set.
-
createFieldValue
public WeightedSet createFieldValue()
Description copied from class:DataType
Creates a new, empty FieldValue of this type- Specified by:
createFieldValue
in classCollectionDataType
-
getValueClass
public Class getValueClass()
- Specified by:
getValueClass
in classDataType
-
createIfNonExistent
public boolean createIfNonExistent()
Returns true if this has the property createIfNonExistent (only relevant for weighted sets)- Returns:
- createIfNonExistent property
-
removeIfZero
public boolean removeIfZero()
Returns true if this has the property removeIfZero (only relevant for weighted sets)- Returns:
- removeIfZero property
-
visitMembers
public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
- Overrides:
visitMembers
in classCollectionDataType
-
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
-
-