Serializable
, Multimap<K,V>
HashMultimap
, HashsetMultimap
, TreeMultimap
public 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)
Multimap
public void putAll(K key, Collection<V> vvs)
Multimap
public Collection<V> get(K key)
Multimap
public boolean isEmpty()
Multimap
public void clear()
Multimap
public Collection<K> keys()
Multimap
public Collection<Map.Entry<K,Collection<V>>> entrySet()
Multimap
Copyright © 2012-2016 Oracle. All Rights Reserved.