K
- The type of keys in the map.V
- The type of values in the lists in the map.public class DelegatingMultivaluedMap<K,V> extends Object implements MultivaluedMap<K,V>
MultivaluedMap
implementation that delegates to another instance.
Convenience class for MultivaluedMap
enhancements that don't want to implement all methods.Constructor and Description |
---|
DelegatingMultivaluedMap(MultivaluedMap<K,V> delegate) |
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(Object o) |
boolean |
containsValue(Object o) |
Set<Map.Entry<K,List<V>>> |
entrySet() |
boolean |
equals(Object o) |
List<V> |
get(Object o) |
V |
getFirst(K key)
A shortcut to get the first value of the supplied key.
|
int |
hashCode() |
boolean |
isEmpty() |
Set<K> |
keySet() |
List<V> |
put(K k,
List<V> vs) |
void |
putAll(Map<? extends K,? extends List<V>> map) |
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 o) |
int |
size() |
Collection<List<V>> |
values() |
public DelegatingMultivaluedMap(MultivaluedMap<K,V> delegate)
public 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 containsKey(Object o)
containsKey
in interface Map<K,List<V>>
public boolean containsValue(Object o)
containsValue
in interface Map<K,List<V>>
public boolean equals(Object o)
Copyright © 2018 JBoss by Red Hat. All rights reserved.