Package org.openjdk.jmh.util
Class DelegatingMultimap<K,V>
- java.lang.Object
-
- org.openjdk.jmh.util.DelegatingMultimap<K,V>
-
- All Implemented Interfaces:
Serializable
,Multimap<K,V>
- Direct Known Subclasses:
HashMultimap
,HashsetMultimap
,TreeMultimap
public class DelegatingMultimap<K,V> extends Object implements Multimap<K,V>, Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<K,Collection<V>>
map
-
Constructor Summary
Constructors Constructor Description DelegatingMultimap(Map<K,Collection<V>> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clears the multimapprotected 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 keyint
hashCode()
boolean
isEmpty()
Checks if multimap is emptyCollection<K>
keys()
Keys in the mapvoid
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()
-
-
-
Field Detail
-
map
protected final Map<K,Collection<V>> map
-
-
Constructor Detail
-
DelegatingMultimap
public DelegatingMultimap(Map<K,Collection<V>> map)
-
-
Method Detail
-
createValueCollection
protected Collection<V> createValueCollection()
-
put
public void put(K key, V value)
Description copied from interface:Multimap
Put the element pair.
-
putAll
public void putAll(K key, Collection<V> vvs)
Description copied from interface:Multimap
Put multiple pairs.
-
get
public Collection<V> get(K key)
Description copied from interface:Multimap
Get all values associated with the key
-
isEmpty
public boolean isEmpty()
Description copied from interface:Multimap
Checks if multimap is empty
-
clear
public void clear()
Description copied from interface:Multimap
Clears the multimap
-
keys
public Collection<K> keys()
Description copied from interface:Multimap
Keys in the map
-
entrySet
public Collection<Map.Entry<K,Collection<V>>> entrySet()
Description copied from interface:Multimap
Get all associations of the multimap. The method is intended for read-only view.
-
-