Package groovy.lang

# Class Tuple2<T1,T2>

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

All Implemented Interfaces:
  `Iterable`, `Collection`, `List`, `SequencedCollection`

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
Description
`Tuple2(T1 first, T2 second)`

## Method Summary

Modifier and Type
Method
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.Collection

`parallelStream, removeIf, stream, toArray`

### Methods inherited from interface java.lang.Iterable

`forEach`

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

`addAll, addFirst, addLast, contains, containsAll, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray`

## Constructor Details

### Tuple2

public Tuple2(T1 first, T2 second)

## Method Details

### getFirst

public T1 getFirst()

### getSecond

public T2 getSecond()