T1
- The type of the first value held by this tupleT2
- The type of the second balue held by this tuplepublic class Tuple2<T1,T2>
extends java.lang.Object
implements java.lang.Iterable, java.io.Serializable
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.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() |
java.util.Iterator<?> |
iterator() |
int |
size()
Return the number of elements in this Tuples.
|
java.lang.Object[] |
toArray()
Turn this Tuples into a plain Object array.
|
java.util.List<java.lang.Object> |
toList()
Turn this Tuples into a plain Object list.
|
java.lang.String |
toString() |
public T1 getT1()
Tuples
.public T2 getT2()
Tuples
.@Nullable public java.lang.Object get(int index)
index
- The index of the object to retrieve. Starts at 0.public java.util.List<java.lang.Object> toList()
public java.lang.Object[] toArray()
@Nonnull public java.util.Iterator<?> iterator()
iterator
in interface java.lang.Iterable
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int size()
public java.lang.String toString()
toString
in class java.lang.Object