|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.internal.util.collection.ImmutableMultivaluedMap<K,V>
K - the keyV - the valuepublic class ImmutableMultivaluedMap<K,V>
An immutable view of a MultivaluedMap.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
ImmutableMultivaluedMap(MultivaluedMap<K,V> delegate)
Creates a new ImmutableMultivaluedMap. |
|
| Method Summary | ||
|---|---|---|
void |
add(K key,
V value)
Add a value to the current list of values for the supplied key. |
|
void |
addAll(K key,
List<V> valueList)
Add all the values from the supplied value list to the current list of values for the supplied key. |
|
void |
addAll(K key,
V... newValues)
Add multiple values to the current list of values for the supplied key. |
|
void |
addFirst(K key,
V value)
Add a value to the first position in the current list of values for the supplied key. |
|
void |
clear()
|
|
boolean |
containsKey(Object key)
|
|
boolean |
containsValue(Object value)
|
|
static
|
empty()
Returns an empty immutable map. |
|
Set<Map.Entry<K,List<V>>> |
entrySet()
|
|
boolean |
equalsIgnoreValueOrder(MultivaluedMap<K,V> otherMap)
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 key,
V value)
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()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public ImmutableMultivaluedMap(MultivaluedMap<K,V> delegate)
delegate - the underlying MultivaluedMap| Method Detail |
|---|
public static <K,V> ImmutableMultivaluedMap<K,V> empty()
public boolean equalsIgnoreValueOrder(MultivaluedMap<K,V> otherMap)
MultivaluedMap
equalsIgnoreValueOrder in interface MultivaluedMap<K,V>otherMap - map to be compared to this one.
public void putSingle(K key,
V value)
MultivaluedMap
putSingle in interface MultivaluedMap<K,V>key - the keyvalue - the single value of the key
public 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 key
public void addAll(K key,
V... newValues)
MultivaluedMapNullPointerException if the supplied array of values
is null.
addAll in interface MultivaluedMap<K,V>key - the key.newValues - the values to be added.
public void addAll(K key,
List<V> valueList)
MultivaluedMapNullPointerException if the
supplied array of values is null.
addAll in interface MultivaluedMap<K,V>key - the key.valueList - the list of values to be added.
public void addFirst(K key,
V value)
MultivaluedMap
addFirst in interface MultivaluedMap<K,V>key - the keyvalue - the value to be added.public int size()
size in interface Map<K,List<V>>public boolean isEmpty()
isEmpty in interface Map<K,List<V>>public boolean containsKey(Object key)
containsKey in interface Map<K,List<V>>public boolean containsValue(Object value)
containsValue in interface Map<K,List<V>>public List<V> get(Object key)
get in interface Map<K,List<V>>
public List<V> put(K key,
List<V> value)
put in interface Map<K,List<V>>public List<V> remove(Object key)
remove in interface Map<K,List<V>>public void putAll(Map<? extends K,? extends List<V>> m)
putAll in interface Map<K,List<V>>public void clear()
clear in interface Map<K,List<V>>public Set<K> keySet()
keySet in interface Map<K,List<V>>public Collection<List<V>> values()
values in interface Map<K,List<V>>public Set<Map.Entry<K,List<V>>> entrySet()
entrySet in interface Map<K,List<V>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||