|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.espirit.common.util.Pair<K,V>
public class Pair<K,V>
Container for a pair of objects, usually a key and a value.
| Constructor Summary | |
|---|---|
Pair(K key,
V value)
Use the factory method Pair.create(Object, Object). |
|
| Method Summary | ||
|---|---|---|
static
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map.Entry |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public Pair(K key,
V value)
Pair.create(Object, Object).
| Method Detail |
|---|
public static <K,V> Pair<K,V> create(K key,
V value)
key and value.
key - key of the pairvalue - value of the pairpublic K getKey()
getKey in interface Map.Entry<K,V>public void setKey(K key)
null keys are allowed.
public V getValue()
null.
getValue in interface Map.Entry<K,V>public V setValue(V value)
null values are allowed.
setValue in interface Map.Entry<K,V>
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||