com.sibvisions.util
Class KeyValueList<K,V>
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<K,List<V>>
com.sibvisions.util.KeyValueList<K,V>
- Type Parameters:
K - key classV - value class
- All Implemented Interfaces:
- Serializable, Cloneable, Map<K,List<V>>
public class KeyValueList<K,V>
- extends Hashtable<K,List<V>>
The KeyValueList is a special Hashtable. It
mapps multiple values to a single key.
- See Also:
- Serialized Form
|
Method Summary |
boolean |
contains(Object pValue)
|
void |
put(K pKey,
V pValue)
Adds the specified pValue to a list of values which are
mapped to the pKey. |
void |
remove(K pKey,
V pValue)
Removes a specific pValue from a list of values which is mapped to the
pKey. |
| Methods inherited from class java.util.Hashtable |
clear, clone, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
KeyValueList
public KeyValueList()
contains
public boolean contains(Object pValue)
-
- Overrides:
contains in class Hashtable<K,List<V>>
put
public void put(K pKey,
V pValue)
- Adds the specified
pValue to a list of values which are
mapped to the pKey. Neither the pKey nor the
pValue can be null.
- Parameters:
pKey - the keypValue - the new value
- Throws:
NullPointerException - if the key or value is null
remove
public void remove(K pKey,
V pValue)
- Removes a specific
pValue from a list of values which is mapped to the
pKey.
- Parameters:
pKey - the keypValue - the value to be removed
Copyright © 2009 SIB Visions GmbH. All Rights Reserved.