K
- Key type
V
- Value type
public abstract class MultiValueMapAdapter<K,V> extends Object implements MultiValueMap<K,V>, Serializable
Modifier and Type | Field and Description |
---|---|
protected Map<K,List<V>> |
internalMap |
Modifier | Constructor and Description |
---|---|
protected |
MultiValueMapAdapter(Map<K,List<V>> internalMap) |
Modifier and Type | Method and Description |
---|---|
void |
add(K key, V value, V... moreValues) |
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,List<V>>> |
entrySet() |
List<V> |
get(Object key) |
V |
getFirst(K key) |
V |
getLast(K key) |
V |
getSingle(K key) |
boolean |
isEmpty() |
Set<K> |
keySet() |
protected abstract Map<K,V> |
newFlattenedMap() |
List<V> |
put(K key, List<V> value) |
void |
putAll(Map<? extends K,? extends List<V>> m) |
List<V> |
remove(Object key) |
void |
setAll(Map<K,V> values) |
void |
setSingle(K key, V value) |
int |
size() |
Map<K,V> |
toMapFirstValues() |
Map<K,V> |
toMapLastValues() |
Map<K,V> |
toMapSingleValues() |
String |
toString() |
Collection<List<V>> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
public void add(K key, V value, V... moreValues)
add
in interface
MultiValueMap<K,V>
public void setSingle(K key, V value)
setSingle
in interface
MultiValueMap<K,V>
public Map<K,V> toMapSingleValues()
toMapSingleValues
in interface
MultiValueMap<K,V>
public Map<K,V> toMapFirstValues()
toMapFirstValues
in interface
MultiValueMap<K,V>
public Map<K,V> toMapLastValues()
toMapLastValues
in interface
MultiValueMap<K,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>>