K - the type of the keys in this mapV - the type of the values in this mappublic interface ListValuedMap<K,V> extends MultiValuedMap<K,V>
A ListValuedMap is a Map with slightly different semantics:
List at that key.List, holding all the values put to that key.| Modifier and Type | Method and Description |
|---|---|
java.util.List<V> |
get(K key)
Gets the list of values associated with the specified key.
|
java.util.List<V> |
remove(java.lang.Object key)
Removes all values associated with the specified key.
|
asMap, clear, containsKey, containsMapping, containsValue, entries, isEmpty, keys, keySet, mapIterator, put, putAll, putAll, putAll, removeMapping, size, valuesjava.util.List<V> get(K key)
This method will return an empty list if
MultiValuedMap.containsKey(Object) 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 retrieveList of values, implementations should return an
empty List for no mappingjava.lang.NullPointerException - if the key is null and null keys are invalidjava.util.List<V> remove(java.lang.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 fromList of values removed, implementations
typically return an empty, unmodifiable List for no mapping foundjava.lang.UnsupportedOperationException - if the map is unmodifiablejava.lang.NullPointerException - if the key is null and null keys are invalidCopyright © 2010 - 2023 Adobe. All Rights Reserved