MultivaluedMap that is backed
by a [key, multi-value] store represented as a Map<K, List<V>>.
| Modifier and Type | Field and Description |
|---|---|
| protected final Map | store
Backing store for the [key, multi-value] pairs. |
| Access | Constructor and Description |
|---|---|
| public | AbstractMultivaluedMap(Map<K, List<V>>
the backing store)Map to be used as a [key, multi-value]
store. Must not be null.Initialize the backing store in the abstract parent multivalued map implementation. |
| Modifier and Type | Method and Description |
|---|---|
| public final void | add(K
the key key, V the value to be added. value)Implements javax. |
| public final void | addAll(K
the key. key, V... the values to be added. newValues)Implements javax. |
| public final void | addAll(K
the key. key, List<V> the list of values to be added. valueList)Implements javax. |
| public final void | addFirst(K
the key key, V the value to be added. value)Implements javax. |
| protected void | addFirstNull(List<V>
value list where the values)null value addition is being
requested.Define the behavior for adding a |
| protected void | |
| 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 | Returns: true if the specified object is equal to the underlying
[key, multi-value] store, false otherwise.object to be compared for equality with this map o)Overrides java. Implements java. |
| public boolean | equalsIgnoreValueOrder(MultivaluedMap<K, V>
map to be compared to this one. omap)Implements javax. |
| 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 final V | getFirst(K
the key key)Implements javax. |
| protected final List | Returns: value list registered with the key. The method is guaranteed to never returnnull.the key. key)Return a non-null list of values for a given key. |
| public int | Returns: a hash code value for the underlying [key, multi-value] store.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 m)Implements java. |
| public final void | putSingle(K
the key key, V the single value of the key. If the value is value)null it
will be ignored.Implements javax. |
| public List | remove(Object
key whose mapping is to be removed from the map key)Implements java. |
| public int | |
| public String | |
| public Collection | values()
Implements java. Collection view of the values contained in this map.
|
| store | back to summary |
|---|---|
| protected final Map<K, List<V>> store Backing store for the [key, multi-value] pairs. | |
| AbstractMultivaluedMap | back to summary |
|---|---|
| public AbstractMultivaluedMap(Map<K, List<V>> store) Initialize the backing store in the abstract parent multivalued map implementation.
| |
| add | back to summary |
|---|---|
| public final void add(K key, V value) Implements javax. Add a value to the current list of values for the supplied key. Note This implementation ignores
| |
| addAll | back to summary |
|---|---|
| public final void addAll(K key, V... newValues) Implements javax. Add multiple values to the current list of values for the supplied key. If
the supplied array of new values is empty, method returns immediately.
Method throws a Note This implementation ignores
| |
| addAll | back to summary |
|---|---|
| public final void addAll(K key, List<V> valueList) Implements javax. Add all the values from the supplied value list to the current list of
values for the supplied key. If the supplied value list is empty, method
returns immediately. Method throws a Note This implementation ignores
| |
| addFirst | back to summary |
|---|---|
| public final void addFirst(K key, V value) Implements javax. Add a value to the first position in the current list of values for the supplied key. Note This implementation ignores
| |
| addFirstNull | back to summary |
|---|---|
| protected void addFirstNull(List<V> values) Define the behavior for adding a
Default implementation is a no-op, i.e. the
| |
| addNull | back to summary |
|---|---|
| protected void addNull(List<V> values) Define the behavior for adding a
Default implementation is a no-op, i.e. the
| |
| 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 o) Overrides java. Implements java. Doc from java. Compares the specified object with this map for equality. Returns
This implementation delegates the method call to to the the underlying [key, multi-value] store.
| |
| equalsIgnoreValueOrder | back to summary |
|---|---|
| public boolean equalsIgnoreValueOrder(MultivaluedMap<K, V> omap) Implements javax. Doc from javax. Compare the specified map with this map for equality modulo the order of values for each key. Specifically, the values associated with each key are compared as if they were ordered lists.
| |
| 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 final V getFirst(K key) Implements javax. Doc from javax. A shortcut to get the first value of the supplied key.
| |
| getValues | back to summary |
|---|---|
| protected final List Return a non-null list of values for a given key. The returned list may be empty.
If there is no entry for the key in the map, a new empty
| |
| 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
This implementation delegates the method call to to the the underlying [key, multi-value] store.
| |
| 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>> m) 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 | |
| putSingle | back to summary |
|---|---|
| public final void putSingle(K key, V value) Implements javax. Set the value for the key to be a one item list consisting of the supplied value. Any existing values will be replaced. Note This implementation ignores
| |
| 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. | |
| 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
| |
| 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
| |