public class Pair<E1,E2>
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Pair(E1 first,
E2 second)
Construct a new pair
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Pair objects are equal iff they have the same content.
|
E1 |
first()
Get the first value from the pair.
|
int |
hashCode() |
E2 |
second()
Get the second value from the pair.
|
void |
setFirst(E1 first)
Set the first value of the pair.
|
void |
setSecond(E2 second)
Set the second value of the pair.
|
public E1 first()
public E2 second()
public void setFirst(E1 first)
first - the new first valuepublic void setSecond(E2 second)
second - the new second valuepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object