public class Pair
extends java.lang.Object
Utility class for storing two pieces of information together.
Constructor and Description |
---|
Pair() |
Pair(java.lang.Object first,
java.lang.Object second) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object that)
Test equality of this object with that.
|
java.lang.Object |
getFirst()
Get the first object in the pair.
|
java.lang.Object |
getSecond()
Get the second object in the pair.
|
int |
hashCode() |
void |
setFirst(java.lang.Object first)
Set the value of the first object in the pair.
|
void |
setSecond(java.lang.Object second)
Set the second object in the pair.
|
public Pair()
public Pair(java.lang.Object first, java.lang.Object second)
public final java.lang.Object getFirst()
Get the first object in the pair.
public final void setFirst(java.lang.Object first)
Set the value of the first object in the pair.
first
- the first objectpublic final java.lang.Object getSecond()
Get the second object in the pair.
public final void setSecond(java.lang.Object second)
Set the second object in the pair.
second
- the second objectpublic boolean equals(java.lang.Object that)
Test equality of this object with that.
equals
in class java.lang.Object
that
- object to comparepublic int hashCode()
hashCode
in class java.lang.Object