T1
- The type of the first value held by this tupleT2
- The type of the second 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() |
protected StringBuilder |
innerToString() |
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() |
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()
protected StringBuilder innerToString()