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>>
map
private static long
serialVersionUID
-
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 void
clear()
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.boolean
equals(java.lang.Object o)
java.util.Collection<V>
get(K key)
Get all values associated with the keyint
hashCode()
boolean
isEmpty()
Checks if multimap is emptyjava.util.Collection<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, java.util.Collection<V> vvs)
Put multiple pairs.void
remove(K key)
java.lang.String
toString()
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:Multimap
Put the element pair.
-
putAll
public void putAll(K key, java.util.Collection<V> vvs)
Description copied from interface:Multimap
Put multiple pairs.
-
get
public java.util.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 java.util.Collection<K> keys()
Description copied from interface:Multimap
Keys in the map
-
entrySet
public java.util.Collection<java.util.Map.Entry<K,java.util.Collection<V>>> entrySet()
Description copied from interface:Multimap
Get all associations of the multimap. The method is intended for read-only view.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-