K
- Key typeV
- Value typepublic class HashMapList<K,V> extends HashMap<K,List<V>>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
Serial version
|
Constructor and Description |
---|
HashMapList()
Constructor.
|
HashMapList(int initialCapacity)
Constructor with initial capacity (of the hash)
|
Modifier and Type | Method and Description |
---|---|
void |
add(K key,
V value)
Add a single value to the given key.
|
boolean |
contains(K key,
V value)
Test if a given value is already present for the key.
|
boolean |
containsKey(Object key)
Check that there is at least one value for the key.
|
boolean |
remove(K key,
V value)
Remove a single value from the map.
|
clear, clone, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
equals, hashCode, toString
private static final long serialVersionUID
public HashMapList()
public HashMapList(int initialCapacity)
initialCapacity
- initial capacitypublic void add(K key, V value)
key
- Keyvalue
- Additional Valuepublic boolean containsKey(Object key)
containsKey
in interface Map<K,List<V>>
containsKey
in class HashMap<K,List<V>>
public boolean remove(K key, V value)
key
- Key to removevalue
- Value to remove.