Interface ITuple

All Known Subinterfaces:
IModifiableTuple
All Known Implementing Classes:
AbstractTuple, BaseFlatTuple, BaseLeftInheritanceTuple, FlatTuple, FlatTuple0, FlatTuple1, FlatTuple2, FlatTuple3, FlatTuple4, LeftInheritanceTuple, LeftInheritanceTuple1, LeftInheritanceTuple2, LeftInheritanceTuple3, LeftInheritanceTuple4, MaskedTuple, Tuple, VolatileMaskedTuple, VolatileModifiableMaskedTuple, VolatileTuple

public interface ITuple
Represents both mutable and immutable tuples
Since:
1.7
  • Method Details

    • get

      Object get(int index)
      Returns:
      the element at the specified index
    • getElements

      Object[] getElements()
      As the tuple is supposed to be immutable, do not modify the returned array.
      Returns:
      the array containing all elements of this Tuple
    • getDistinctElements

      <T> Set<T> getDistinctElements()
      Returns:
      the set containing all distinct elements of this Tuple, cast as type T
    • getSize

      int getSize()
      Returns:
      number of elements
    • invertIndex

      Map<Object,Integer> invertIndex()
      Calculates an inverted index of the elements of this pattern. For each element, the index of the (last) occurrence is calculated.
      Returns:
      the inverted index mapping each element of this pattern to its index in the array
    • invertIndexWithMupliplicity

      Map<Object,List<Integer>> invertIndexWithMupliplicity()
      Calculates an inverted index of the elements of this pattern. For each element, the index of all of its occurrences is calculated.
      Returns:
      the inverted index mapping each element of this pattern to its index in the array
    • toImmutable

      Tuple toImmutable()