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.
|
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.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object