Interface ListValuedMap<K,V> 
- Type Parameters:
- K- the type of the keys in this map
- V- the type of the values in this map
- All Superinterfaces:
- MultiValuedMap<K,- V> 
- All Known Implementing Classes:
- AbstractListValuedMap,- ArrayListValuedHashMap,- ArrayListValuedLinkedHashMap
Defines a map that holds a list of values against each key.
 
 A ListValuedMap is a Map with slightly different semantics:
 
- Since:
- 4.1
- 
Method SummaryMethods inherited from interface org.apache.commons.collections4.MultiValuedMapasMap, clear, containsKey, containsMapping, containsValue, entries, isEmpty, keys, keySet, mapIterator, put, putAll, putAll, putAll, removeMapping, size, values
- 
Method Details- 
getGets the list of values associated with the specified key.This method will return an empty list if MultiValuedMap.containsKey(Object)returnsfalse. Changes to the returned list will update the underlyingListValuedMapand vice-versa.- Specified by:
- getin interface- MultiValuedMap<K,- V> 
- Parameters:
- key- the key to retrieve
- Returns:
- the Listof values, implementations should return an emptyListfor no mapping
- Throws:
- NullPointerException- if the key is null and null keys are invalid
 
- 
removeRemoves all values associated with the specified 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. - Specified by:
- removein interface- MultiValuedMap<K,- V> 
- Parameters:
- key- the key to remove values from
- Returns:
- the Listof values removed, implementations typically return an empty, unmodifiableListfor no mapping found
- Throws:
- UnsupportedOperationException- if the map is unmodifiable
- NullPointerException- if the key is null and null keys are invalid
 
 
-