Class WeightedSetDataType

java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
All Implemented Interfaces:
Cloneable, Comparable<DataType>

public class WeightedSetDataType extends CollectionDataType
Author:
Einar M R Rosenvinge
  • Field Details

    • classId

      public static int classId
  • Constructor Details

    • WeightedSetDataType

      public WeightedSetDataType(DataType nestedType, boolean createIfNonExistent, boolean removeIfZero)
    • WeightedSetDataType

      public WeightedSetDataType(DataType nestedType, boolean createIfNonExistent, boolean removeIfZero, int id)
  • Method Details

    • clone

      public WeightedSetDataType clone()
      Overrides:
      clone in class CollectionDataType
    • 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 class CollectionDataType
    • getValueClass

      public Class getValueClass()
      Specified by:
      getValueClass in class DataType
    • 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 class CollectionDataType
    • buildFieldPath

      public FieldPath buildFieldPath(String remainFieldName)
      Description copied from class: DataType
      Creates a field path from the given field path string.
      Overrides:
      buildFieldPath in class DataType
      Parameters:
      remainFieldName - a string containing the field path
      Returns:
      Returns a valid field path, parsed from the string