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