public class Pair<F,S>
extends java.lang.Object
Constructor and Description |
---|
Pair(F first,
S second)
Constructor for a Pair.
|
Modifier and Type | Method and Description |
---|---|
static <A,B> Pair<A,B> |
create(A a,
B b)
Convenience method for creating an appropriately typed pair.
|
boolean |
equals(java.lang.Object o)
Checks the two objects for equality by delegating to their respective
Object.equals(Object) methods. |
int |
hashCode()
Compute a hash code using the hash codes of the underlying objects
|
java.lang.String |
toString() |
public boolean equals(java.lang.Object o)
Object.equals(Object)
methods.equals
in class java.lang.Object
o
- the Pair
to which this one is to be checked for equalitypublic int hashCode()
hashCode
in class java.lang.Object
public static <A,B> Pair<A,B> create(A a, B b)
A
- the class of the first ordinateB
- the class of the second ordinatea
- the first object in the Pairb
- the second object in the pairpublic java.lang.String toString()
toString
in class java.lang.Object