Package org.openjdk.jmh.util
Class DelegatingMultimap<K,V>
- java.lang.Object
-
- org.openjdk.jmh.util.DelegatingMultimap<K,V>
-
- All Implemented Interfaces:
java.io.Serializable,Multimap<K,V>
- Direct Known Subclasses:
HashMultimap,HashsetMultimap,TreeMultimap
public class DelegatingMultimap<K,V> extends java.lang.Object implements Multimap<K,V>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<K,java.util.Collection<V>>mapprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description DelegatingMultimap(java.util.Map<K,java.util.Collection<V>> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears the multimapprotected java.util.Collection<V>createValueCollection()java.util.Collection<java.util.Map.Entry<K,java.util.Collection<V>>>entrySet()Get all associations of the multimap.booleanequals(java.lang.Object o)java.util.Collection<V>get(K key)Get all values associated with the keyinthashCode()booleanisEmpty()Checks if multimap is emptyjava.util.Collection<K>keys()Keys in the mapvoidmerge(Multimap<K,V> other)voidput(K key, V value)Put the element pair.voidputAll(K key, java.util.Collection<V> vvs)Put multiple pairs.voidremove(K key)java.lang.StringtoString()java.util.Collection<V>values()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
createValueCollection
protected java.util.Collection<V> createValueCollection()
-
put
public void put(K key, V value)
Description copied from interface:MultimapPut the element pair.
-
putAll
public void putAll(K key, java.util.Collection<V> vvs)
Description copied from interface:MultimapPut multiple pairs.
-
get
public java.util.Collection<V> get(K key)
Description copied from interface:MultimapGet all values associated with the key
-
isEmpty
public boolean isEmpty()
Description copied from interface:MultimapChecks if multimap is empty
-
clear
public void clear()
Description copied from interface:MultimapClears the multimap
-
keys
public java.util.Collection<K> keys()
Description copied from interface:MultimapKeys in the map
-
entrySet
public java.util.Collection<java.util.Map.Entry<K,java.util.Collection<V>>> entrySet()
Description copied from interface:MultimapGet all associations of the multimap. The method is intended for read-only view.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-