Package dk.netarkivet.common.utils
Class KeyValuePair<K,V>
- java.lang.Object
-
- dk.netarkivet.common.utils.KeyValuePair<K,V>
-
-
Constructor Summary
Constructors Constructor Description KeyValuePair(K k, V v)
Constructs a Key-Value pair using the given key and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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).
-
-
-
Method Detail
-
getKey
public K getKey()
Returns the key corresponding to this entry.
-
getValue
public V getValue()
Returns the value corresponding to this entry.
-
setValue
public V setValue(V newValue) throws UnsupportedOperationException
Replaces the value corresponding to this entry with the specified value (optional operation).- Specified by:
setValue
in interfaceMap.Entry<K,V>
- Parameters:
newValue
- new value to be stored in this entry.- Returns:
- old value corresponding to the entry.
- Throws:
UnsupportedOperationException
- if the put operation is not supported by the backing map.
-
-