Package org.springframework.util
Interface MultiValueMap<K,V> 
- Type Parameters:
- K- the key type
- V- the value element type
- All Known Implementing Classes:
- HttpHeaders,- LinkedMultiValueMap,- MultiValueMapAdapter,- StompHeaders,- WebSocketHttpHeaders
Extension of the 
Map interface that stores multiple values.- Since:
- 3.0
- Author:
- Arjen Poutsma
- 
Nested Class Summary
- 
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.default voidaddIfAbsent(K key, V value) Return the first value for the given key.voidSet the given single value under the given key.voidSet the given values under.Return aMapwith the first values contained in thisMultiValueMap.Methods inherited from interface java.util.Mapclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
- 
Method Details- 
getFirstReturn the first value for the given key.- Parameters:
- key- the key
- Returns:
- the first value for the specified key, or nullif none
 
- 
addAdd the given single value to the current list of values for the given key.- Parameters:
- key- the key
- value- the value to be added
 
- 
addAllAdd all the values of the given list to the current list of values for the given key.- Parameters:
- key- they key
- values- the values to be added
- Since:
- 5.0
 
- 
addAllAdd all the values of the givenMultiValueMapto the current values.- Parameters:
- values- the values to be added
- Since:
- 5.0
 
- 
addIfAbsent- Parameters:
- key- the key
- value- the value to be added
- Since:
- 5.2
 
- 
setSet the given single value under the given key.- Parameters:
- key- the key
- value- the value to set
 
- 
setAllSet the given values under.- Parameters:
- values- the values.
 
- 
toSingleValueMapReturn aMapwith the first values contained in thisMultiValueMap.- Returns:
- a single value representation of this map
 
 
-