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