public class Pair<K,V> extends Object implements Serializable, Map.Entry<K,V>
| Constructor and Description |
|---|
Pair(K key,
V value)
Use the factory method
create(Object,Object). |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> Pair<K,V> |
create(K key,
V value)
Create a pair with the given
key and value. |
K |
getKey()
The key of the pair.
|
V |
getValue()
Returns the value corresponding to this pair.
|
void |
setKey(K key)
Set the key of the pair,
null keys are allowed. |
V |
setValue(V value)
Set the value of the pair,
null values are allowed. |
public Pair(K key, V value)
create(Object,Object).public static <K,V> Pair<K,V> create(K key, @Nullable V value)
key and value.public K getKey()
public void setKey(K key)
null keys are allowed.public V getValue()
null.Copyright © 2014 e-Spirit AG. All Rights Reserved. Build 5.0_BETA.500