Map to the MultiValueMap contract.
CollectionUtils#toMultiValueMap, LinkedMultiValueMap
| Access | Constructor and Description |
|---|---|
| public | MultiValueMapAdapter(Map<K, List<V>>
the plain target targetMap)MapWrap the given target |
| Modifier and Type | Method and Description |
|---|---|
| public void | add(K
the key key, V the value to be added value)Implements org. |
| public void | addAll(K
they key key, List<? extends V> the values to be added values)Implements org. |
| public void | addAll(MultiValueMap<K, V>
the values to be added values)Implements org. MultiValueMap to the current values.
|
| public void | clear()
Implements java. |
| public boolean | containsKey(Object
key whose presence in this map is to be tested key)Implements java. true if this map contains a mapping for the specified
key.
|
| public boolean | containsValue(Object
value whose presence in this map is to be tested value)Implements java. true if this map maps one or more keys to the
specified value.
|
| public Set | entrySet()
Implements java. Set view of the mappings contained in this map.
|
| public boolean | equals(Object
object to be compared for equality with this map other)Overrides java. Implements java. |
| public void | forEach(BiConsumer<? super K, ? super List<V>>
The action to be performed for each entry action)Overrides default java. |
| public List | get(Object
the key whose associated value is to be returned key)Implements java. null if this map contains no mapping for the key.
|
| public V | getFirst(K
the key key)Implements org. |
| public int | hashCode()
Overrides java. Implements java. |
| public boolean | |
| public Set | |
| public List | put(K
key with which the specified value is to be associated key, List<V> value to be associated with the specified key value)Implements java. |
| public void | putAll(Map<? extends K, ? extends List<V>>
mappings to be stored in this map map)Implements java. |
| public List | putIfAbsent(K
key with which the specified value is to be associated key, List<V> value to be associated with the specified key value)Overrides default java. null) associates it with the given value and returns
null, else returns the current value.
|
| public List | remove(Object
key whose mapping is to be removed from the map key)Implements java. |
| public void | set(K
the key key, V the value to set value)Implements org. |
| public void | setAll(Map<K, V>
the values. values)Implements org. |
| public int | |
| public Map | toSingleValueMap()
Implements org. Map with the first values contained in this MultiValueMap.
|
| public String | |
| public Collection | values()
Implements java. Collection view of the values contained in this map.
|
| targetMap | back to summary |
|---|---|
| private final Map<K, List<V>> targetMap | |
| MultiValueMapAdapter | back to summary |
|---|---|
| public MultiValueMapAdapter(Map<K, List<V>> targetMap) Wrap the given target | |
| add | back to summary |
|---|---|
| public void add(K key, V value) Implements org. Doc from org. Add the given single value to the current list of values for the given key.
| |
| addAll | back to summary |
|---|---|
| public void addAll(K key, List<? extends V> values) Implements org. Doc from org. Add all the values of the given list to the current list of values for the given key. | |
| addAll | back to summary |
|---|---|
| public void addAll(MultiValueMap<K, V> values) Implements org. Doc from org. Add all the values of the given
| |
| clear | back to summary |
|---|---|
| public void clear() Implements java. Doc from java. Removes all of the mappings from this map (optional operation). The map will be empty after this call returns.
| |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(Object key) Implements java. Doc from java. Returns | |
| containsValue | back to summary |
|---|---|
| public boolean containsValue(Object value) Implements java. Doc from java. Returns | |
| entrySet | back to summary |
|---|---|
| public Set Implements java. Doc from java. Returns a | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Implements java. Doc from java. Compares the specified object with this map for equality. Returns
| |
| forEach | back to summary |
|---|---|
| public void forEach(BiConsumer<? super K, ? super List<V>> action) Overrides default java. Doc from java. Performs the given action for each entry in this map until all entries have been processed or the action throws an exception. Unless otherwise specified by the implementing class, actions are performed in the order of entry set iteration (if an iteration order is specified.) Exceptions thrown by the action are relayed to the caller.
| |
| get | back to summary |
|---|---|
| public List Implements java. Doc from java. Returns the value to which the specified key is mapped,
or More formally, if this map contains a mapping from a key
If this map permits null values, then a return value of
| |
| getFirst | back to summary |
|---|---|
| public V getFirst(K key) Implements org. Doc from org. Return the first value for the given key. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements java. Doc from java. Returns the hash code value for this map. The hash code of a map is
defined to be the sum of the hash codes of each entry in the map's
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements java. Doc from java. Returns
| |
| keySet | back to summary |
|---|---|
| public Set Implements java. Doc from java. Returns a | |
| put | back to summary |
|---|---|
| public List Implements java. Doc from java. Associates the specified value with the specified key in this map
(optional operation). If the map previously contained a mapping for
the key, the old value is replaced by the specified value. (A map
| |
| putAll | back to summary |
|---|---|
| public void putAll(Map<? extends K, ? extends List<V>> map) Implements java. Doc from java. Copies all of the mappings from the specified map to this map
(optional operation). The effect of this call is equivalent to that
of calling | |
| putIfAbsent | back to summary |
|---|---|
| public List Overrides default java. Doc from java. If the specified key is not already associated with a value (or is mapped
to
| |
| remove | back to summary |
|---|---|
| public List Implements java. Doc from java. Removes the mapping for a key from this map if it is present
(optional operation). More formally, if this map contains a mapping
from key Returns the value to which this map previously associated the key,
or If this map permits null values, then a return value of
The map will not contain a mapping for the specified key once the call returns. | |
| set | back to summary |
|---|---|
| public void set(K key, V value) Implements org. Doc from org. Set the given single value under the given key.
| |
| setAll | back to summary |
|---|---|
| public void setAll(Map<K, V> values) Implements org. Doc from org. Set the given values under. | |
| size | back to summary |
|---|---|
| public int size() Implements java. Doc from java. Returns the number of key-value mappings in this map. If the
map contains more than
| |
| toSingleValueMap | back to summary |
|---|---|
| public Map Implements org. Doc from org. Return a | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| values | back to summary |
|---|---|
| public Collection Implements java. Doc from java. Returns a
| |