Package dk.netarkivet.common.utils
Class KeyValuePair<K,V>
- java.lang.Object
-
- dk.netarkivet.common.utils.KeyValuePair<K,V>
-
- Type Parameters:
K
- the Object type used as keyV
- the Object type used as value
- All Implemented Interfaces:
java.util.Map.Entry<K,V>
public class KeyValuePair<K,V> extends java.lang.Object implements java.util.Map.Entry<K,V>
A generic Map.Entry class, useful for returning key-value-like results.
-
-
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).
-
-
-
Constructor Detail
-
KeyValuePair
public KeyValuePair(K k, V v)
Constructs a Key-Value pair using the given key and value.- Parameters:
k
- The key objectv
- The value object
-
-
Method Detail
-