Class MultiValueMapAdapter<K,V> 
java.lang.Object
org.springframework.util.MultiValueMapAdapter<K,V> 
- Type Parameters:
- K- the key type
- V- the value element type
- All Implemented Interfaces:
- Serializable, Map<K,- List<V>>, MultiValueMap<K, - V> 
- Direct Known Subclasses:
- LinkedMultiValueMap
Adapts a given 
Map to the MultiValueMap contract.- Since:
- 5.3
- Author:
- Arjen Poutsma, Juergen Hoeller
- See Also:
- 
Nested Class Summary
- 
Constructor SummaryConstructorsConstructorDescriptionMultiValueMapAdapter(Map<K, List<V>> targetMap) Wrap the given targetMapas aMultiValueMapadapter.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd the given single value to the current list of values for the given key.voidAdd all the values of the given list to the current list of values for the given key.voidaddAll(MultiValueMap<K, V> values) Add all the values of the givenMultiValueMapto the current values.voidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanvoidforEach(BiConsumer<? super K, ? super List<V>> action) Return the first value for the given key.inthashCode()booleanisEmpty()keySet()voidputIfAbsent(K key, List<V> value) voidSet the given single value under the given key.voidSet the given values under.intsize()Return aMapwith the first values contained in thisMultiValueMap.toString()Collection<List<V>> values()Methods inherited from interface Mapcompute, computeIfAbsent, computeIfPresent, getOrDefault, merge, remove, replace, replace, replaceAllMethods inherited from interface MultiValueMapaddIfAbsent, asSingleValueMap
- 
Constructor Details- 
MultiValueMapAdapter
 
- 
- 
Method Details- 
getFirstDescription copied from interface:MultiValueMapReturn the first value for the given key.- Specified by:
- getFirstin interface- MultiValueMap<K,- V> 
- Parameters:
- key- the key
- Returns:
- the first value for the specified key, or nullif none
 
- 
addDescription copied from interface:MultiValueMapAdd the given single value to the current list of values for the given key.- Specified by:
- addin interface- MultiValueMap<K,- V> 
- Parameters:
- key- the key
- value- the value to be added
 
- 
addAllDescription copied from interface:MultiValueMapAdd all the values of the given list to the current list of values for the given key.- Specified by:
- addAllin interface- MultiValueMap<K,- V> 
- Parameters:
- key- they key
- values- the values to be added
 
- 
addAllDescription copied from interface:MultiValueMapAdd all the values of the givenMultiValueMapto the current values.- Specified by:
- addAllin interface- MultiValueMap<K,- V> 
- Parameters:
- values- the values to be added
 
- 
setDescription copied from interface:MultiValueMapSet the given single value under the given key.- Specified by:
- setin interface- MultiValueMap<K,- V> 
- Parameters:
- key- the key
- value- the value to set
 
- 
setAllDescription copied from interface:MultiValueMapSet the given values under.- Specified by:
- setAllin interface- MultiValueMap<K,- V> 
- Parameters:
- values- the values.
 
- 
toSingleValueMapDescription copied from interface:MultiValueMapReturn aMapwith the first values contained in thisMultiValueMap. The difference between this method andMultiValueMap.asSingleValueMap()is that this method returns a copy of the entries of this map, whereas the latter returns a view.- Specified by:
- toSingleValueMapin interface- MultiValueMap<K,- V> 
- Returns:
- a single value representation of this map
 
- 
size
- 
isEmpty
- 
containsKey- Specified by:
- containsKeyin interface- Map<K,- V> 
 
- 
containsValue- Specified by:
- containsValuein interface- Map<K,- V> 
 
- 
get
- 
put
- 
putIfAbsent
- 
remove
- 
putAll
- 
clear
- 
keySet
- 
values
- 
entrySet
- 
forEach
- 
equals
- 
hashCode
- 
toString
 
-