All Implemented Interfaces:
ITuple

public final class FlatTuple extends BaseFlatTuple
Default Tuple implementation, with statically unknown arity.
  • Constructor Details

    • FlatTuple

      protected FlatTuple(Object... elements)
      Creates a FlatTuple instance, fills it with the given array.

      Users should consider calling Tuples.flatTupleOf(Object...) instead to save memory on low-arity tuples.

      Parameters:
      elements - array of substitution values
  • Method Details

    • get

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

      public int getSize()
      Returns:
      number of elements
    • getElements

      public Object[] getElements()
      Description copied from class: AbstractTuple
      As the tuple is supposed to be immutable, do not modify the returned array.
      Specified by:
      getElements in interface ITuple
      Overrides:
      getElements in class AbstractTuple
      Returns:
      the array containing all elements of this Tuple
    • internalEquals

      protected boolean internalEquals(ITuple other)
      Description copied from class: AbstractTuple
      Compares the elements stored in this tuple to another tuple
      Overrides:
      internalEquals in class AbstractTuple