|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.common.utils.KeyValuePair<K,V>
K
- the Object type used as keyV
- the Object type used as valuepublic class KeyValuePair<K,V>
A generic Map.Entry class, useful for returning key-value-like results.
Constructor Summary | |
---|---|
KeyValuePair(K k,
V v)
Constructs a Key-Value pair using the given key and value. |
Method Summary | |
---|---|
K |
getKey()
Returns the key corresponding to this entry. |
V |
getValue()
Returns the value corresponding to this entry. |
V |
setValue(V newValue)
Replaces the value corresponding to this entry with the specified value (optional operation). |
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 KeyValuePair(K k, V v)
k
- The key objectv
- The value objectMethod Detail |
---|
public K getKey()
getKey
in interface java.util.Map.Entry<K,V>
public V getValue()
getValue
in interface java.util.Map.Entry<K,V>
public V setValue(V newValue) throws java.lang.UnsupportedOperationException
setValue
in interface java.util.Map.Entry<K,V>
newValue
- new value to be stored in this entry.
java.lang.UnsupportedOperationException
- if the put operation is not supported by the backing
map.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |