public interface ListValuedMap<K,V> extends MultiValuedMap<K ,V>
A ListValuedMap is a Map with slightly different semantics:
| Modifier and Type | Method and Description |
|---|---|
List |
get(K key)
Gets the list of values associated with the specified key.
|
List |
remove(Object
Removes all values associated with the specified key.
|
asMap, clear, containsKey, containsMapping, containsValue, entries, isEmpty, keys, keySet, mapIterator, put, putAll, putAll, putAll, removeMapping, size, valuesList<V> get(K key)
This method will return an empty list if MultiValuedMap returns false. Changes to the returned list will update the underlying ListValuedMap and vice-versa.
get in interface
MultiValuedMap<K,V>
key - the key to retrieve
List of values, implementations should return an empty
List for no mapping
NullPointerException - if the key is null and null keys are invalid
List<V> remove(Object key)
The returned list may be modifiable, but updates will not be propagated to this list-valued map. In case no mapping was stored for the specified key, an empty, unmodifiable list will be returned.
remove in interface
MultiValuedMap<K,V>
key - the key to remove values from
List of values removed, implementations typically return an empty, unmodifiable
List for no mapping found
UnsupportedOperationException - if the map is unmodifiable
NullPointerException - if the key is null and null keys are invalid