T1
- The type of the first non-null value held by this tupleT2
- The type of the second non-null value held by this tuplepublic class Tuple2<T1,T2> extends Object implements Iterable<Object>, Serializable
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Object |
get(int index)
Get the object at the given index.
|
T1 |
getT1()
Type-safe way to get the fist object of this
Tuples . |
T2 |
getT2()
Type-safe way to get the second object of this
Tuples . |
int |
hashCode() |
Iterator<Object> |
iterator() |
int |
size()
Return the number of elements in this Tuples.
|
Object[] |
toArray()
Turn this Tuples into a plain Object array.
|
List<Object> |
toList()
Turn this Tuples into a plain Object list.
|
String |
toString()
A Tuple String representation is the comma separated list of values, enclosed
in square brackets.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public T1 getT1()
Tuples
.public T2 getT2()
Tuples
.@Nullable public Object get(int index)
index
- The index of the object to retrieve. Starts at 0.public List<Object> toList()
public Object[] toArray()
public int size()