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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWeightedSetDataType(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 typebooleanReturns true if this has the property createIfNonExistent (only relevant for weighted sets)booleanisTag()Returns whether or not this is a tag type weighted set.booleanReturns true if this has the property removeIfZero (only relevant for weighted sets)voidsetTag(boolean tag) Called by SD parser if a data type is explicitly tag.voidvisitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor) Methods inherited from class com.yahoo.document.CollectionDataType
createByReflection, getNestedType, getPrimitiveType, isMultivalue, isValueCompatible, registerMethods inherited from class com.yahoo.document.DataType
compareTo, createFieldValue, equals, getArray, getCode, getId, getMap, getName, getTensor, getWeightedSet, getWeightedSet, hashCode, isAssignableFrom, isAssignableTo, isRegistered, lastPredefinedDataTypeId, register, setId, setName, toStringMethods 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, serializeWithIdMethods 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:
clonein 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:DataTypeCreates a new, empty FieldValue of this type- Specified by:
createFieldValuein classCollectionDataType
-
getValueClass
- Specified by:
getValueClassin 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:
visitMembersin classCollectionDataType
-
buildFieldPath
Description copied from class:DataTypeCreates a field path from the given field path string.- Overrides:
buildFieldPathin classDataType- Parameters:
remainFieldName- a string containing the field path- Returns:
- Returns a valid field path, parsed from the string
-