Tuple (Groovy 5.0.8)

Package: groovy.lang

## [Java] Class Tuple<E>

- groovy.lang.Tuple

- All Implemented Interfaces and Traits:
    Serializable, Cloneable, Comparable, RandomAccess

      public class Tuple<E>
      extends AbstractList
      implements Serializable, Cloneable, Comparable, RandomAccess

  Represents a list of Objects.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `Tuple(E contents)`
    `Tuple(Tuple<E> tuple)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Tuple<E>` | `clone()`
    `` | `public int` | `compareTo(Tuple<E> other)`
    `` | `public boolean` | `equals(Object o)`
    `` | `public E` | `get(int index)`
    `` | `public int` | `hashCode()`
    `` | `public int` | `size()`
    `` | `public List<E>` | `subList(int fromIndex, int toIndex)`
    `` | `public Tuple<E>` | `subTuple(int fromIndex, int toIndex)`
    `` | `public E[]` | `toArray()`
    `<T>` | `public T[]` | `toArray(T[] a)`
    `` | `public static Tuple0` | `tuple()` Construct a tuple of degree 0.
    `<T1>` | `public static Tuple1<T1>` | `tuple(T1 v1)` Construct a tuple of degree 1.
    `<T1, T2>` | `public static Tuple2<T1, T2>` | `tuple(T1 v1, T2 v2)` Construct a tuple of degree 2.
    `<T1, T2, T3>` | `public static Tuple3<T1, T2, T3>` | `tuple(T1 v1, T2 v2, T3 v3)` Construct a tuple of degree 3.
    `<T1, T2, T3, T4>` | `public static Tuple4<T1, T2, T3, T4>` | `tuple(T1 v1, T2 v2, T3 v3, T4 v4)` Construct a tuple of degree 4.
    `<T1, T2, T3, T4, T5>` | `public static Tuple5<T1, T2, T3, T4, T5>` | `tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5)` Construct a tuple of degree 5.
    `<T1, T2, T3, T4, T5, T6>` | `public static Tuple6<T1, T2, T3, T4, T5, T6>` | `tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6)` Construct a tuple of degree 6.
    `<T1, T2, T3, T4, T5, T6, T7>` | `public static Tuple7<T1, T2, T3, T4, T5, T6, T7>` | `tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7)` Construct a tuple of degree 7.
    `<T1, T2, T3, T4, T5, T6, T7, T8>` | `public static Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>` | `tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8)` Construct a tuple of degree 8.
    `<T1, T2, T3, T4, T5, T6, T7, T8, T9>` | `public static Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>` | `tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9)` Construct a tuple of degree 9.
    `<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>` | `public static Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>` | `tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10)` Construct a tuple of degree 10.
    `<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>` | `public static Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>` | `tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11)` Construct a tuple of degree 11.
    `<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>` | `public static Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>` | `tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12)` Construct a tuple of degree 12.
    `<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>` | `public static Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>` | `tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13)` Construct a tuple of degree 13.
    `<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>` | `public static Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>` | `tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14)` Construct a tuple of degree 14.
    `<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>` | `public static Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>` | `tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15)` Construct a tuple of degree 15.
    `<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>` | `public static Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>` | `tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16)` Construct a tuple of degree 16.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractList` | `add, add, addAll, addAll, clear, contains, containsAll, equals, forEach, get, getClass, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, notify, notifyAll, parallelStream, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, stream, subList, toArray, toArray, toArray, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### @SafeVarargs
      public Tuple(E contents)

    - #### public Tuple(Tuple<E> tuple)

  - ### Method Detail

    - #### @Override
      public Tuple<E> clone()

    - #### @Override
      public int compareTo(Tuple<E> other)

    - #### @Override
      public boolean equals(Object o)

    - #### @Override
      public E get(int index)

    - #### @Override
      public int hashCode()

    - #### @Override
      public int size()

    - #### @SuppressWarnings("unchecked")
      @Override
      public List<E> subList(int fromIndex, int toIndex)

    - #### public Tuple<E> subTuple(int fromIndex, int toIndex)

    - #### @SuppressWarnings("unchecked")
      @Override
      public E[] toArray()

    - #### <T> @SuppressWarnings("unchecked")
      @Override
      public T[] toArray(T[] a)

    - #### public static Tuple0 tuple()

      Construct a tuple of degree 0.

    - #### <T1> public static Tuple1<T1> tuple(T1 v1)

      Construct a tuple of degree 1.

    - #### <T1, T2> public static Tuple2<T1, T2> tuple(T1 v1, T2 v2)

      Construct a tuple of degree 2.

    - #### <T1, T2, T3> public static Tuple3<T1, T2, T3> tuple(T1 v1, T2 v2, T3 v3)

      Construct a tuple of degree 3.

    - #### <T1, T2, T3, T4> public static Tuple4<T1, T2, T3, T4> tuple(T1 v1, T2 v2, T3 v3, T4 v4)

      Construct a tuple of degree 4.

    - #### <T1, T2, T3, T4, T5> public static Tuple5<T1, T2, T3, T4, T5> tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5)

      Construct a tuple of degree 5.

    - #### <T1, T2, T3, T4, T5, T6> public static Tuple6<T1, T2, T3, T4, T5, T6> tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6)

      Construct a tuple of degree 6.

    - #### <T1, T2, T3, T4, T5, T6, T7> public static Tuple7<T1, T2, T3, T4, T5, T6, T7> tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7)

      Construct a tuple of degree 7.

    - #### <T1, T2, T3, T4, T5, T6, T7, T8> public static Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8)

      Construct a tuple of degree 8.

    - #### <T1, T2, T3, T4, T5, T6, T7, T8, T9> public static Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9)

      Construct a tuple of degree 9.

    - #### <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> public static Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10)

      Construct a tuple of degree 10.

    - #### <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> public static Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11)

      Construct a tuple of degree 11.

    - #### <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> public static Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12)

      Construct a tuple of degree 12.

    - #### <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> public static Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13)

      Construct a tuple of degree 13.

    - #### <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> public static Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14)

      Construct a tuple of degree 14.

    - #### <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> public static Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15)

      Construct a tuple of degree 15.

    - #### <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> public static Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> tuple(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16)

      Construct a tuple of degree 16.