public class KeyValuePair<K,V>
extends java.lang.Object
| Constructor and Description |
|---|
KeyValuePair(KeyValuePair<K,V> keyValuePair)
Create a cloned instance.
|
KeyValuePair(K key,
V value)
Create a new initialized instance.
|
| Modifier and Type | Method and Description |
|---|---|
K |
getKey()
Get the value.
|
V |
getValue()
Get the value.
|
void |
setKey(K key)
Update/set the key.
|
void |
setValue(V value)
Update/set the value.
|
public KeyValuePair(K key, V value)
key - the keyvalue - the valuepublic KeyValuePair(KeyValuePair<K,V> keyValuePair)
keyValuePair - the key/value pair to clonepublic void setKey(K key)
key - the keypublic K getKey()
public void setValue(V value)
value - the valuepublic V getValue()