public class UnmodifiableMultivaluedMap<K,V> extends Object implements MultivaluedMap<K,V>
MultivaluedMap
interfaceConstructor and Description |
---|
UnmodifiableMultivaluedMap(MultivaluedMap<K,V> delegate) |
Modifier and Type | Method and Description |
---|---|
void |
add(K k,
V v)
Add a value to the current list of values for the supplied key.
|
void |
addAll(K k,
List<V> list)
Add all the values from the supplied value list to the current list of
values for the supplied key.
|
void |
addAll(K k,
V... vs)
Add multiple values to the current list of values for the supplied key.
|
void |
addFirst(K k,
V v)
Add a value to the first position in the current list of values for the
supplied key.
|
void |
clear() |
boolean |
containsKey(Object o) |
boolean |
containsValue(Object o) |
Set<Map.Entry<K,List<V>>> |
entrySet() |
boolean |
equalsIgnoreValueOrder(MultivaluedMap<K,V> omap)
Compare the specified map with this map for equality modulo the order
of values for each key.
|
List<V> |
get(Object key) |
V |
getFirst(K key)
A shortcut to get the first value of the supplied key.
|
boolean |
isEmpty() |
Set<K> |
keySet() |
List<V> |
put(K key,
List<V> value) |
void |
putAll(Map<? extends K,? extends List<V>> m) |
void |
putSingle(K k,
V v)
Set the key's value to be a one item list consisting of the supplied value.
|
List<V> |
remove(Object key) |
int |
size() |
Collection<List<V>> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
public UnmodifiableMultivaluedMap(MultivaluedMap<K,V> delegate)
public void putSingle(K k, V v)
MultivaluedMap
putSingle
in interface MultivaluedMap<K,V>
k
- the keyv
- the single value of the keypublic void add(K k, V v)
MultivaluedMap
add
in interface MultivaluedMap<K,V>
k
- the keyv
- the value to be added.public V getFirst(K key)
MultivaluedMap
getFirst
in interface MultivaluedMap<K,V>
key
- the keypublic void addAll(K k, V... vs)
MultivaluedMap
NullPointerException
if the supplied array of values
is null
.addAll
in interface MultivaluedMap<K,V>
k
- the key.vs
- the values to be added.public void addAll(K k, List<V> list)
MultivaluedMap
NullPointerException
if the
supplied array of values is null
.addAll
in interface MultivaluedMap<K,V>
k
- the key.list
- the list of values to be added.public void addFirst(K k, V v)
MultivaluedMap
addFirst
in interface MultivaluedMap<K,V>
k
- the keyv
- the value to be added.public boolean equalsIgnoreValueOrder(MultivaluedMap<K,V> omap)
MultivaluedMap
equalsIgnoreValueOrder
in interface MultivaluedMap<K,V>
omap
- map to be compared to this one.public boolean containsKey(Object o)
containsKey
in interface Map<K,List<V>>
public boolean containsValue(Object o)
containsValue
in interface Map<K,List<V>>
Copyright © 2017 JBoss by Red Hat. All rights reserved.