K
- the keyV
- the valuepublic class UnmodifiableMultivaluedMap<K,V> extends java.lang.Object implements MultivaluedMap<K,V>
MultivaluedMap
.Constructor and Description |
---|
UnmodifiableMultivaluedMap(MultivaluedMap<K,V> delegate)
Creates a new ImmutableMultivaluedMap.
|
Modifier and Type | Method and Description |
---|---|
void |
add(K key,
V value)
Add a value to the current list of values for the supplied key.
|
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Set<java.util.Map.Entry<K,java.util.List<V>>> |
entrySet() |
java.util.List<V> |
get(java.lang.Object key) |
V |
getFirst(K key)
A shortcut to get the first value of the supplied key.
|
boolean |
isEmpty() |
java.util.Set<K> |
keySet() |
java.util.List<V> |
put(K key,
java.util.List<V> value) |
void |
putAll(java.util.Map<? extends K,? extends java.util.List<V>> m) |
void |
putSingle(K key,
V value)
Set the key's value to be a one item list consisting of the supplied value.
|
java.util.List<V> |
remove(java.lang.Object key) |
int |
size() |
java.util.Collection<java.util.List<V>> |
values() |
public UnmodifiableMultivaluedMap(MultivaluedMap<K,V> delegate)
delegate
- the underlying MultivaluedMappublic void putSingle(K key, V value)
MultivaluedMap
putSingle
in interface MultivaluedMap<K,V>
key
- the keyvalue
- the single value of the keypublic void add(K key, V value)
MultivaluedMap
add
in interface MultivaluedMap<K,V>
key
- the keyvalue
- the value to be added.public V getFirst(K key)
MultivaluedMap
getFirst
in interface MultivaluedMap<K,V>
key
- the keypublic boolean isEmpty()
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public java.util.List<V> get(java.lang.Object key)
public java.util.List<V> remove(java.lang.Object key)
public java.util.Set<K> keySet()
public java.util.Collection<java.util.List<V>> values()
Copyright © 2016 Oracle Corporation. All Rights Reserved.