K - Key typeV - Value typepublic class KeyValue<K,V>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
K |
key
The key of the key-value pair.
|
V |
value
The value of the key-value pair.
|
| Constructor and Description |
|---|
KeyValue(K key,
V value)
Create a new key-value pair.
|
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 valuepublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object