Serializable, Multimap<K,V>HashMultimap, HashsetMultimap, TreeMultimappublic class DelegatingMultimap<K,V> extends Object implements Multimap<K,V>, Serializable
| Modifier and Type | Field | Description |
|---|---|---|
protected Map<K,Collection<V>> |
map |
| Constructor | Description |
|---|---|
DelegatingMultimap(Map<K,Collection<V>> map) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
clear() |
Clears the multimap
|
protected Collection<V> |
createValueCollection() |
|
Collection<Map.Entry<K,Collection<V>>> |
entrySet() |
Get all associations of the multimap.
|
boolean |
equals(Object o) |
|
Collection<V> |
get(K key) |
Get all values associated with the key
|
int |
hashCode() |
|
boolean |
isEmpty() |
Checks if multimap is empty
|
Collection<K> |
keys() |
Keys in the map
|
void |
merge(Multimap<K,V> other) |
|
void |
put(K key,
V value) |
Put the element pair.
|
void |
putAll(K key,
Collection<V> vvs) |
Put multiple pairs.
|
void |
remove(K key) |
|
String |
toString() |
|
Collection<V> |
values() |
protected final Map<K,Collection<V>> map
public DelegatingMultimap(Map<K,Collection<V>> map)
protected Collection<V> createValueCollection()
public void put(K key, V value)
Multimappublic void putAll(K key, Collection<V> vvs)
Multimappublic Collection<V> get(K key)
Multimappublic boolean isEmpty()
Multimappublic void clear()
Multimappublic Collection<K> keys()
Multimappublic Collection<Map.Entry<K,Collection<V>>> entrySet()
MultimapCopyright © 2012-2017 Oracle. All Rights Reserved.