public class Pair<First,Second>
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Pair(First first,
Second second)
Construct pair of values.
|
Modifier and Type | Method and Description |
---|---|
static <K,V> Pair<K,V> |
createPair(K key,
V value) |
boolean |
equals(java.lang.Object obj) |
First |
getFirst()
Returns first value within pair.
|
Second |
getSecond()
Returns second value within pair.
|
int |
hashCode() |
void |
setFirst(First first)
Set the first value of the pair to a new value.
|
void |
setSecond(Second second)
Set the second value of the pair to a new value.
|
java.lang.String |
toString() |
public static <K,V> Pair<K,V> createPair(K key, V value)
public First getFirst()
public Second getSecond()
public void setFirst(First first)
first
- value to be setpublic void setSecond(Second second)
second
- value to be setpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object