org.eclipse.viatra.query.runtime.matchers.tuple

## Class FlatTuple

- java.lang.Object
- - org.eclipse.viatra.query.runtime.matchers.tuple.Tuple
  - - org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple

-     public class FlatTuple
      extends Tuple

  Default Tuple implementation

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.matchers.tuple.Tuple

      `cachedHash`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FlatTuple(java.lang.Object... elements)` Creates a Tuple instance, fills it with the given array.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `get(int index)`
    `java.lang.Object[]` | `getElements()` As the tuple is supposed to be immutable, do not modify the returned array.
    `int` | `getSize()`
    `protected boolean` | `internalEquals(Tuple other)`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.matchers.tuple.Tuple

      `equals, getDistinctElements, hashCode, invertIndex, invertIndexWithMupliplicity, replaceAll, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FlatTuple

          public FlatTuple(java.lang.Object... elements)

      Creates a Tuple instance, fills it with the given array. @pre: no elements are null
      Parameters:
        `elements` - array of substitution values

  - ### Method Detail

    - #### get

          public java.lang.Object get(int index)

      Specified by:
        `get` in class `Tuple`
      Returns:
        the element at the specified index

    - #### getSize

          public int getSize()

      Specified by:
        `getSize` in class `Tuple`
      Returns:
        number of elements

    - #### getElements

          public java.lang.Object[] getElements()

      Description copied from class: `Tuple`
      As the tuple is supposed to be immutable, do not modify the returned array.
      Overrides:
        `getElements` in class `Tuple`
      Returns:
        the array containing all elements of this Tuple

    - #### internalEquals

          protected boolean internalEquals(Tuple other)

      Overrides:
        `internalEquals` in class `Tuple`