public class Pair<X,Y>
extends java.lang.Object
Constructor and Description |
---|
Pair(X first,
Y second)
Creates a new instance of Pair.
|
Modifier and Type | Method and Description |
---|---|
static <X,Y> Pair<X,Y> |
cons(X first,
Y second) |
boolean |
equals(java.lang.Object rhs) |
X |
first()
Gets the first element of this Pair.
|
int |
hashCode() |
Y |
second()
Gets the second element of this Pair.
|
java.lang.String |
toString() |
public X first()
public Y second()
public boolean equals(java.lang.Object rhs)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static <X,Y> Pair<X,Y> cons(X first, Y second)