Class SetField<E>

Type Parameters:
E - Java type for the set elements

public class SetField<E> extends CollectionField<NavigableSet<E>,E>
Set field.
  • Method Details

    • getElementIndex

      public SetElementIndex<E> getElementIndex()
      Description copied from class: CollectionField
      Get the index on this fields's "element" sub-field.
      Overrides:
      getElementIndex in class CollectionField<NavigableSet<E>,E>
      Returns:
      the index on this field's "element" sub-field
    • getValue

      public NavigableSet<E> getValue(Transaction tx, ObjId id)
      Description copied from class: Field
      Get the value of this field in the given object. Does not alter the schema of the object.
      Specified by:
      getValue in class CollectionField<NavigableSet<E>,E>
      Parameters:
      tx - transaction
      id - object id
      Returns:
      this field's value in the specified object
    • getKey

      public byte[] getKey(ObjId id, E element)
      Get the byte[] key in the underlying key/value store corresponding to this field in the specified object and the specified element.
      Parameters:
      id - object ID
      element - set element
      Returns:
      the corresponding KVDatabase key
      Throws:
      IllegalArgumentException - if id is null or has the wrong object type
      See Also:
    • visit

      public <R> R visit(FieldSwitch<R> target)
      Description copied from class: Field
      Apply visitor pattern.
      Specified by:
      visit in class Field<NavigableSet<E>>
      Type Parameters:
      R - visitor return type
      Parameters:
      target - target to invoke
      Returns:
      return value from the method of target corresponding to this instance's type
    • toString

      public String toString()
      Specified by:
      toString in class SchemaItem