Package groovy.lang
Class Tuple2<T1,T2>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
groovy.lang.Tuple
groovy.lang.Tuple2<T1,T2>
- All Implemented Interfaces:
Serializable,Cloneable,Comparable,Iterable,Collection,List,RandomAccess
Represents a list of 2 typed Objects.
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class groovy.lang.Tuple
compareTo, equals, get, hashCode, size, subList, subTuple, toArray, toArray, tuple, tuple, tuple, tuple, tuple, tuple, tuple, tuple, tuple, tuple, tuple, tuple, tuple, tuple, tuple, tuple, tupleMethods inherited from class java.util.AbstractList
add, add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, setMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator
-
Constructor Details
-
Tuple2
Creates a tuple containing the supplied elements.- Parameters:
v1- the first elementv2- the second element
-
Tuple2
Creates a tuple from the supplied tuple.- Parameters:
tuple- the source tuple
-
-
Method Details
-
getFirst
Deprecated.Returns the first element.- Returns:
- the first element
-
getSecond
Deprecated.Returns the second element.- Returns:
- the second element
-
getV1
Returns the first element.- Returns:
- the first element
-
getV2
Returns the second element.- Returns:
- the second element
-
clone
-