Class ArrayListValuedHashMap<K,V> 
java.lang.Object
org.apache.commons.collections4.multimap.AbstractMultiValuedMap<K,V>
 
org.apache.commons.collections4.multimap.AbstractListValuedMap<K,V>
 
org.apache.commons.collections4.multimap.ArrayListValuedHashMap<K,V> 
- Type Parameters:
- K- the type of the keys in this map
- V- the type of the values in this map
- All Implemented Interfaces:
- Serializable,- ListValuedMap<K,,- V> - MultiValuedMap<K,- V> 
Implements a 
ListValuedMap, using a HashMap to provide data
 storage and ArrayLists as value collections. This is the standard
 implementation of a ListValuedMap.
 Note that ArrayListValuedHashMap is not synchronized and is not thread-safe. If you wish to use this map from multiple threads concurrently, you must use appropriate synchronization. This class may throw exceptions when accessed by concurrent threads without synchronization.
- Since:
- 4.1
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionCreates an empty ArrayListValuedHashMap with the default initial map capacity (16) and the default initial list capacity (3).ArrayListValuedHashMap(int initialListCapacity) Creates an empty ArrayListValuedHashMap with the default initial map capacity (16) and the specified initial list capacity.ArrayListValuedHashMap(int initialMapCapacity, int initialListCapacity) Creates an empty ArrayListValuedHashMap with the specified initial map and list capacities.ArrayListValuedHashMap(Map<? extends K, ? extends V> map) Creates an ArrayListValuedHashMap copying all the mappings of the given map.ArrayListValuedHashMap(MultiValuedMap<? extends K, ? extends V> map) Creates an ArrayListValuedHashMap copying all the mappings of the given map.
- 
Method SummaryModifier and TypeMethodDescriptionCreates a new value collection using the provided factory.voidTrims the capacity of all value collections to their current size.Methods inherited from class org.apache.commons.collections4.multimap.AbstractListValuedMapget, getMap, removeMethods inherited from class org.apache.commons.collections4.multimap.AbstractMultiValuedMapasMap, clear, containsKey, containsMapping, containsValue, doReadObject, doWriteObject, entries, equals, hashCode, isEmpty, keys, keySet, mapIterator, put, putAll, putAll, putAll, removeMapping, setMap, size, toString, valuesMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.collections4.MultiValuedMapasMap, clear, containsKey, containsMapping, containsValue, entries, isEmpty, keys, keySet, mapIterator, put, putAll, putAll, putAll, removeMapping, size, values
- 
Constructor Details- 
ArrayListValuedHashMappublic ArrayListValuedHashMap()Creates an empty ArrayListValuedHashMap with the default initial map capacity (16) and the default initial list capacity (3).
- 
ArrayListValuedHashMapCreates an empty ArrayListValuedHashMap with the default initial map capacity (16) and the specified initial list capacity.- Parameters:
- initialListCapacity- the initial capacity used for value collections
 
- 
ArrayListValuedHashMapCreates an empty ArrayListValuedHashMap with the specified initial map and list capacities.- Parameters:
- initialMapCapacity- the initial hashmap capacity
- initialListCapacity- the initial capacity used for value collections
 
- 
ArrayListValuedHashMapCreates an ArrayListValuedHashMap copying all the mappings of the given map.- Parameters:
- map- a- Mapto copy into this map
 
- 
ArrayListValuedHashMapCreates an ArrayListValuedHashMap copying all the mappings of the given map.- Parameters:
- map- a- MultiValuedMapto copy into this map
 
 
- 
- 
Method Details- 
createCollectionDescription copied from class:AbstractListValuedMapCreates a new value collection using the provided factory.- Specified by:
- createCollectionin class- AbstractListValuedMap<K,- V> 
- Returns:
- a new list
 
- 
trimToSizeTrims the capacity of all value collections to their current size.
 
-