public class WeightedSetDataType extends CollectionDataType
Modifier and Type | Field and Description |
---|---|
static int |
classId |
private boolean |
createIfNonExistent
Should an operation to a non-existent member of a weightedset cause the member to be created
|
private boolean |
removeIfZero
Should a member of a weightedset with weight 0 be removed
|
private boolean |
tag
The tag type is ambiguous, this flag is true if the user explicitly set a field to tag
|
Constructor and 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) |
Modifier and Type | Method and 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 type
|
boolean |
createIfNonExistent()
Returns true if this has the property createIfNonExistent (only relevant for weighted sets)
|
private static String |
createName(DataType nested,
boolean createIfNonExistent,
boolean removeIfZero) |
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) |
createByReflection, getNestedType, getPrimitiveType, isMultivalue, isValueCompatible, register, setNestedType
compareTo, createFieldValue, equals, getArray, getCode, getId, getMap, getName, getTensor, getWeightedSet, getWeightedSet, hashCode, isAssignableFrom, isRegistered, lastPredefinedDataTypeId, register, setId, setName, setRegistered, skipDotInString, toString
public static int classId
private boolean createIfNonExistent
private boolean removeIfZero
private boolean tag
public WeightedSetDataType(DataType nestedType, boolean createIfNonExistent, boolean removeIfZero)
public WeightedSetDataType(DataType nestedType, boolean createIfNonExistent, boolean removeIfZero, int id)
public WeightedSetDataType clone()
clone
in class CollectionDataType
public void setTag(boolean tag)
tag
- true if this is a tag set.public boolean isTag()
private static String createName(DataType nested, boolean createIfNonExistent, boolean removeIfZero)
public WeightedSet createFieldValue()
DataType
createFieldValue
in class CollectionDataType
public Class getValueClass()
getValueClass
in class DataType
public boolean createIfNonExistent()
public boolean removeIfZero()
public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
visitMembers
in class CollectionDataType
public FieldPath buildFieldPath(String remainFieldName)
DataType
buildFieldPath
in class DataType
remainFieldName
- a string containing the field pathCopyright © 2018. All rights reserved.