K - The keyV - The valuepublic class Tuple<K,V> extends Object
Pair.| Constructor and Description |
|---|
Tuple(K first,
V second)
Creates a new
Tuple. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
K |
getFirst()
Gets the first object, otherwise known as "key".
|
V |
getSecond()
Gets the second object, otherwise known as "value".
|
int |
hashCode() |
static <K,V> Tuple<K,V> |
of(K first,
V second)
|
String |
toString() |
public static <K,V> Tuple<K,V> of(K first, V second)
K - The type of first objectV - The type of second objectfirst - The first objectsecond - The second objectpublic K getFirst()
public V getSecond()