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

## Class Tuple

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

- All Implemented Interfaces:
    ITuple
  Direct Known Subclasses:
    BaseFlatTuple, BaseLeftInheritanceTuple, MaskedTuple

      public abstract class Tuple
      extends AbstractTuple

  Immutable tuple. Obtain instances via utility class `Tuples`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `cachedHash` Caches precalculated hash value

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Tuple()` Creates a Tuple instance Derivatives should call calcHash()

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `int` | `hashCode()`
    `Tuple` | `replaceAll(java.lang.Object obsolete, java.lang.Object replacement)`
    `Tuple` | `toImmutable()`

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

      `doCalcHash, getDistinctElements, getElements, internalEquals, invertIndex, invertIndexWithMupliplicity, raiseIndexingError, toString`

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

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

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.matchers.tuple.ITuple

      `get, getSize`

- - ### Field Detail

    - #### cachedHash

          protected int cachedHash

      Caches precalculated hash value

  - ### Constructor Detail

    - #### Tuple

          protected Tuple()

      Creates a Tuple instance Derivatives should call calcHash()

  - ### Method Detail

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### replaceAll

          public Tuple replaceAll(java.lang.Object obsolete,
                                  java.lang.Object replacement)

    - #### toImmutable

          public Tuple toImmutable()