public class Pair<F,S>
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Pair(F f,
S s)
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) |
F |
getFirst()
Returns f value within pair.
|
S |
getSecond()
Returns s value within pair.
|
int |
hashCode() |
void |
setFirst(F f)
Set the f value of the pair to a new value.
|
void |
setSecond(S s)
Set the s 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 F getFirst()
public S getSecond()
public void setFirst(F f)
f
- value to be setpublic void setSecond(S s)
s
- 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