K - the key typeV - the value element typepublic class LinkedMultiValueMap<K,V> extends MultiValueMapAdapter<K,V> implements Serializable, Cloneable
MultiValueMap that wraps a LinkedHashMap,
storing multiple values in an ArrayList.
This Map implementation is generally not thread-safe. It is primarily designed for data structures exposed from request objects, for use in a single thread only.
| Constructor and Description |
|---|
LinkedMultiValueMap()
Create a new LinkedMultiValueMap that wraps a
LinkedHashMap. |
LinkedMultiValueMap(int expectedSize)
Create a new LinkedMultiValueMap that wraps a
LinkedHashMap
with an initial capacity that can accommodate the specified number of
elements without any immediate resize/rehash operations to be expected. |
LinkedMultiValueMap(Map<K,List<V>> otherMap)
Copy constructor: Create a new LinkedMultiValueMap with the same mappings as
the specified Map.
|
| Modifier and Type | Method and Description |
|---|---|
LinkedMultiValueMap<K,V> |
clone()
Create a regular copy of this Map.
|
LinkedMultiValueMap<K,V> |
deepCopy()
Create a deep copy of this Map.
|
add, addAll, addAll, clear, containsKey, containsValue, entrySet, equals, get, getFirst, hashCode, isEmpty, keySet, put, putAll, remove, set, setAll, size, toSingleValueMap, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitaddIfAbsentcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic LinkedMultiValueMap()
LinkedHashMap.public LinkedMultiValueMap(int expectedSize)
LinkedHashMap
with an initial capacity that can accommodate the specified number of
elements without any immediate resize/rehash operations to be expected.expectedSize - the expected number of elements (with a corresponding
capacity to be derived so that no resize/rehash operations are needed)CollectionUtils.newLinkedHashMap(int)public LinkedMultiValueMap(Map<K,List<V>> otherMap)
otherMap - the Map whose mappings are to be placed in this Mapclone(),
deepCopy()public LinkedMultiValueMap<K,V> deepCopy()
ArrayList for each entry)
along the lines of MultiValueMap.addAll semanticsMultiValueMapAdapter.addAll(MultiValueMap),
clone()public LinkedMultiValueMap<K,V> clone()
clone in class ObjectMap.put semanticsMultiValueMapAdapter.put(Object, List),
MultiValueMapAdapter.putAll(Map),
LinkedMultiValueMap(Map),
deepCopy()