K - the key typeV - the value element typepublic class LinkedMultiValueMap<K,V> extends Object implements Map<K,List<V>>, Serializable, Cloneable
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.
| 构造器和说明 |
|---|
LinkedMultiValueMap()
Create a new LinkedMultiValueMap that wraps a
LinkedHashMap. |
LinkedMultiValueMap(int initialCapacity)
Create a new LinkedMultiValueMap that wraps a
LinkedHashMap
with the given initial capacity. |
LinkedMultiValueMap(Map<K,List<V>> targetMap) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(K key,
V value) |
void |
addAll(K key,
List<? extends V> values) |
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,List<V>>> |
entrySet() |
boolean |
equals(Object obj) |
List<V> |
get(Object key) |
V |
getFirst(K key) |
int |
hashCode() |
boolean |
isEmpty() |
Set<K> |
keySet() |
List<V> |
put(K key,
List<V> value) |
void |
putAll(Map<? extends K,? extends List<V>> map) |
List<V> |
remove(Object key) |
void |
set(K key,
V value) |
void |
setAll(Map<K,V> values) |
int |
size() |
Map<K,V> |
toSingleValueMap() |
String |
toString() |
Collection<List<V>> |
values() |
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic LinkedMultiValueMap()
LinkedHashMap.public LinkedMultiValueMap(int initialCapacity)
LinkedHashMap
with the given initial capacity.initialCapacity - the initial capacityCopyright © 2021. All rights reserved.