Package javax.ws.rs.core
Interface MultivaluedMap<K,V>
A map of key-values pairs. Each key can have zero or more values.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a value to the current list of values for the supplied key.A shortcut to get the first value of the supplied key.void
Set the key's value to be a one item list consisting of the supplied value.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
-
putSingle
Set the key's value to be a one item list consisting of the supplied value. Any existing values will be replaced.- Parameters:
key
- the keyvalue
- the single value of the key
-
add
Add a value to the current list of values for the supplied key.- Parameters:
key
- the keyvalue
- the value to be added.
-
getFirst
A shortcut to get the first value of the supplied key.- Parameters:
key
- the key- Returns:
- the first value for the specified key or null if the key is not in the map.
-