Class LinkedHashSetValuedLinkedHashMap<K,V>
- java.lang.Object
-
- org.apache.commons.collections4.multimap.AbstractMultiValuedMap<K,V>
-
- org.apache.commons.collections4.multimap.AbstractSetValuedMap<K,V>
-
- org.apache.commons.collections4.multimap.LinkedHashSetValuedLinkedHashMap<K,V>
-
- Type Parameters:
K- the type of the keys in this mapV- the type of the values in this map
- All Implemented Interfaces:
java.io.Serializable,MultiValuedMap<K,V>,SetValuedMap<K,V>
public class LinkedHashSetValuedLinkedHashMap<K,V> extends AbstractSetValuedMap<K,V> implements java.io.Serializable
Implements aSetValuedMap, using aLinkedHashMapto provide data storage andLinkedHashSets as value collections. This is the standard implementation of a SetValuedMap.Note that LinkedHashSetValuedLinkedHashMap 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.5.0-M3
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LinkedHashSetValuedLinkedHashMap()Creates an empty LinkedHashSetValuedHashMap with the default initial map capacity (16) and the default initial set capacity (3).LinkedHashSetValuedLinkedHashMap(int initialSetCapacity)Creates an empty LinkedHashSetValuedHashMap with the default initial map capacity (16) and the specified initial set capacity.LinkedHashSetValuedLinkedHashMap(int initialMapCapacity, int initialSetCapacity)Creates an empty LinkedHashSetValuedHashMap with the specified initial map and list capacities.LinkedHashSetValuedLinkedHashMap(java.util.Map<? extends K,? extends V> map)Creates an LinkedHashSetValuedHashMap copying all the mappings of the given map.LinkedHashSetValuedLinkedHashMap(MultiValuedMap<? extends K,? extends V> map)Creates an LinkedHashSetValuedHashMap copying all the mappings of the given map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.LinkedHashSet<V>createCollection()Creates a new value collection using the provided factory.-
Methods inherited from class org.apache.commons.collections4.multimap.AbstractSetValuedMap
get, getMap, remove
-
Methods inherited from class org.apache.commons.collections4.multimap.AbstractMultiValuedMap
asMap, clear, containsKey, containsMapping, containsValue, doReadObject, doWriteObject, entries, equals, hashCode, isEmpty, keys, keySet, mapIterator, put, putAll, putAll, putAll, removeMapping, setMap, size, toString, values
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.commons.collections4.MultiValuedMap
asMap, clear, containsKey, containsMapping, containsValue, entries, isEmpty, keys, keySet, mapIterator, put, putAll, putAll, putAll, removeMapping, size, values
-
-
-
-
Constructor Detail
-
LinkedHashSetValuedLinkedHashMap
public LinkedHashSetValuedLinkedHashMap()
Creates an empty LinkedHashSetValuedHashMap with the default initial map capacity (16) and the default initial set capacity (3).
-
LinkedHashSetValuedLinkedHashMap
public LinkedHashSetValuedLinkedHashMap(int initialSetCapacity)
Creates an empty LinkedHashSetValuedHashMap with the default initial map capacity (16) and the specified initial set capacity.- Parameters:
initialSetCapacity- the initial capacity used for value collections
-
LinkedHashSetValuedLinkedHashMap
public LinkedHashSetValuedLinkedHashMap(int initialMapCapacity, int initialSetCapacity)
Creates an empty LinkedHashSetValuedHashMap with the specified initial map and list capacities.- Parameters:
initialMapCapacity- the initial hashmap capacityinitialSetCapacity- the initial capacity used for value collections
-
LinkedHashSetValuedLinkedHashMap
public LinkedHashSetValuedLinkedHashMap(java.util.Map<? extends K,? extends V> map)
Creates an LinkedHashSetValuedHashMap copying all the mappings of the given map.- Parameters:
map- aMapto copy into this map
-
LinkedHashSetValuedLinkedHashMap
public LinkedHashSetValuedLinkedHashMap(MultiValuedMap<? extends K,? extends V> map)
Creates an LinkedHashSetValuedHashMap copying all the mappings of the given map.- Parameters:
map- aMultiValuedMapto copy into this map
-
-
Method Detail
-
createCollection
protected java.util.LinkedHashSet<V> createCollection()
Description copied from class:AbstractSetValuedMapCreates a new value collection using the provided factory.- Specified by:
createCollectionin classAbstractSetValuedMap<K,V>- Returns:
- a new set
-
-