groovy.lang

## Class Tuple2<T1,T2>

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.AbstractList
    - - groovy.lang.Tuple
      - - groovy.lang.Tuple2<T1,T2>

- All Implemented Interfaces:
    Iterable, Collection, List

      public class Tuple2<T1,T2>
      extends Tuple

  Represents a list of 2 typed Objects.

- - ### Field Summary

    - ### Fields inherited from class java.util.AbstractList

      `modCount`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Tuple2(T1 first, T2 second)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `T1` | `getFirst()`
    `T2` | `getSecond()`

    - ### Methods inherited from class groovy.lang.Tuple

      `equals, get, hashCode, size, subList`

    - ### Methods inherited from class java.util.AbstractList

      `add, add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set`

    - ### Methods inherited from class java.util.AbstractCollection

      `addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString`

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

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

    - ### Methods inherited from interface java.util.List

      `addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray`

- - ### Constructor Detail

    - #### Tuple2

          public Tuple2(T1 first,
                T2 second)

  - ### Method Detail

    - #### getFirst

          public T1 getFirst()

    - #### getSecond

          public T2 getSecond()