A - class of the first object.B - class of the second object.public class Pair<A,B>
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Pair(A fst,
B snd)
Create a pair from the given two objects.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
A |
getFirst()
Return the first object of the pair.
|
B |
getSecond()
Return the second object of the pair.
|
int |
hashCode() |
void |
setFirst(A v)
Set the first object of the pair.
|
void |
setSecond(B v)
Set the second object of the pair.
|
java.lang.String |
toString() |
public A getFirst()
public B getSecond()
public void setFirst(A v)
v - set first object to v.public void setSecond(B v)
v - set second object to v.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object