public class MultiValuedMap<K,V>
extends java.util.HashMap<K,java.util.List<V>>
Constructor and Description |
---|
MultiValuedMap() |
Modifier and Type | Method and Description |
---|---|
java.util.List<V> |
optPut(K key,
V value)
Convenience method.
|
void |
putMap(java.util.Map<K,V> map)
Copies all of the mappings from the specified map into this map.
|
java.util.List<V> |
putSingle(K key,
V value)
Add the provided value to the list of values associated with this key
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
public java.util.List<V> optPut(K key, V value)
key
- the key of which the values need to be updatedvalue
- the value to be added when not NULLpublic java.util.List<V> putSingle(K key, V value)
key
- the keyvalue
- the new (additional) value belonging to this key.