public class Tuple<T1,T2>
extends java.lang.Object
| Constructor and Description |
|---|
Tuple(T1 object1,
T2 object2)
Creates a new 2-tuple.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
Gets whether this tuple equals an object.
|
T1 |
getFirst()
Gets the first object of this tuple - synonym for
object1(). |
T2 |
getSecond()
Gets the second object of this tuple - synonym for
object2(). |
int |
hashCode()
Gets the hash code of this tuple.
|
T1 |
object1()
Gets the first object of this tuple.
|
T2 |
object2()
Gets the second object of this tuple.
|
java.lang.String |
toString() |
static <T1,T2> Tuple<T1,T2> |
tuple(T1 object1,
T2 object2)
Creates a new 2-tuple.
|
public static <T1,T2> Tuple<T1,T2> tuple(T1 object1, T2 object2)
object1 - The first object of the tuple.object2 - The second object of the tuple.public T1 object1()
public T2 object2()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object