K - Key typeV - Value typepublic class KeyValue<K,V> extends Object
| Modifier and Type | Field and Description |
|---|---|
K | keyThe key of the key-value pair. |
V | valueThe value of the key-value pair. |
| Constructor and Description |
|---|
KeyValue(K key, V value)Create a new key-value pair. |
| Modifier and Type | Method and Description |
|---|---|
boolean | equals(Object obj) |
int | hashCode() |
static <K,V> KeyValue<K,V> | pair(K key, V value)Create a new key-value pair. |
String | toString() |
public final K key
public final V value
public static <K,V> KeyValue<K,V> pair(K key, V value)
K - the type of the keyV - the type of the valuekey - the keyvalue - the value