Package com.aspectran.utils
Interface MultiValueMap<K,V>
- All Known Implementing Classes:
LinkedCaseInsensitiveMultiValueMap
,LinkedMultiValueMap
This class is a clone of org.springframework.util.MultiValueMap
Extension of theMap
interface that stores multiple values.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the given single value to the current list of values for the given key.void
addAll
(MultiValueMap<K, V> values) Add all the values of the givenMultiValueMap
to the current values.void
Add all the values of the given list to the current list of values for the given key.default void
addIfAbsent
(K key, V value) Return the first value for the given key.void
Set the given single value under the given key.void
Set the given values under the given key.void
Set the given values under.Return aMap
with the first values contained in thisMultiValueMap
.Methods inherited from interface java.util.Map
clear, 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
-
getFirst
Return the first value for the given key.- Parameters:
key
- the key- Returns:
- the first value for the specified key, or
null
if none
-
add
Add the given single value to the current list of values for the given key.- Parameters:
key
- the keyvalue
- the value to be added
-
addAll
Add all the values of the given list to the current list of values for the given key.- Parameters:
key
- they keyvalues
- the values to be added
-
addAll
Add all the values of the givenMultiValueMap
to the current values.- Parameters:
values
- the values to be added
-
addIfAbsent
- Parameters:
key
- the keyvalue
- the value to be added
-
set
Set the given single value under the given key.- Parameters:
key
- the keyvalue
- the value to set
-
set
Set the given values under the given key.- Parameters:
key
- the keyvalues
- the values
-
setAll
Set the given values under.- Parameters:
values
- the values
-
toSingleValueMap
Return aMap
with the first values contained in thisMultiValueMap
.- Returns:
- a single value representation of this map
-