public class MultiValueMapAdapter<K,V> extends Object implements MultiValueMap<K,V>, Serializable
| 构造器和说明 |
|---|
MultiValueMapAdapter(Map<K,List<V>> map) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(K key,
V value)
Add the given single value to the current list of values for the given key.
|
void |
addAll(K key,
List<? extends V> values)
Add all the values of the given list to the current list of values for the given key.
|
void |
addAll(MultiValueMap<K,V> values)
Add all the values of the given
MultiValueMap to the current values. |
void |
addIfAbsent(K key,
V value)
|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,List<V>>> |
entrySet() |
boolean |
equals(Object other) |
List<V> |
get(Object key) |
V |
getFirst(K key)
Return the first value for the given 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)
Set the given single value under the given key.
|
void |
setAll(Map<K,V> values)
Set the given values under.
|
int |
size() |
Map<K,V> |
toSingleValueMap()
Return a
Map with the first values contained in this MultiValueMap. |
String |
toString() |
Collection<List<V>> |
values() |
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll@Nullable public V getFirst(K key)
MultiValueMapgetFirst 在接口中 MultiValueMap<K,V>key - the keynull if nonepublic void add(K key, @Nullable V value)
MultiValueMapadd 在接口中 MultiValueMap<K,V>key - the keyvalue - the value to be addedpublic void addAll(K key, List<? extends V> values)
MultiValueMapaddAll 在接口中 MultiValueMap<K,V>key - they keyvalues - the values to be addedpublic void addIfAbsent(K key, V value)
MultiValueMapaddIfAbsent 在接口中 MultiValueMap<K,V>key - the keyvalue - the value to be addedpublic void addAll(MultiValueMap<K,V> values)
MultiValueMapMultiValueMap to the current values.addAll 在接口中 MultiValueMap<K,V>values - the values to be addedpublic void set(K key, @Nullable V value)
MultiValueMapset 在接口中 MultiValueMap<K,V>key - the keyvalue - the value to setpublic void setAll(Map<K,V> values)
MultiValueMapsetAll 在接口中 MultiValueMap<K,V>values - the values.public Map<K,V> toSingleValueMap()
MultiValueMapMap with the first values contained in this MultiValueMap.toSingleValueMap 在接口中 MultiValueMap<K,V>Copyright © 2020. All rights reserved.