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:
Cloneable
,Comparable<DataType>
- Author:
- Einar M R Rosenvinge
-
Field Summary
-
Constructor Summary
ConstructorDescriptionWeightedSetDataType
(DataType nestedType, boolean createIfNonExistent, boolean removeIfZero) WeightedSetDataType
(DataType nestedType, boolean createIfNonExistent, boolean removeIfZero, int id) -
Method Summary
Modifier and TypeMethodDescriptionbuildFieldPath
(String remainFieldName) Creates a field path from the given field path string.clone()
Creates a new, empty FieldValue of this typeboolean
Returns true if this has the property createIfNonExistent (only relevant for weighted sets)boolean
isTag()
Returns whether or not this is a tag type weighted set.boolean
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
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
Methods inherited from class com.yahoo.vespa.objects.Identifiable
create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, onDeserialize, onGetClassId, onSerialize, putUtf8, registerClass, registerClass, serialize, serializeOptional, serializeWithId
Methods inherited from class com.yahoo.vespa.objects.Selectable
select, select, selectMembers
-
Field Details
-
classId
public static int classId
-
-
Constructor Details
-
WeightedSetDataType
-
WeightedSetDataType
public WeightedSetDataType(DataType nestedType, boolean createIfNonExistent, boolean removeIfZero, int id)
-
-
Method Details
-
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
Description copied from class:DataType
Creates a new, empty FieldValue of this type- Specified by:
createFieldValue
in classCollectionDataType
-
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
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
-