Package org.openjdk.jmh.util
Interface Multimap<K,V>
-
- Type Parameters:
K
- key typeV
- value type
- All Known Implementing Classes:
DelegatingMultimap
,HashMultimap
,HashsetMultimap
,TreeMultimap
public interface Multimap<K,V>
Basic Multimap.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Clears the multimapCollection<Map.Entry<K,Collection<V>>>
entrySet()
Get all associations of the multimap.Collection<V>
get(K key)
Get all values associated with the keyboolean
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 k, Collection<V> vs)
Put multiple pairs.void
remove(K key)
Collection<V>
values()
-
-
-
Method Detail
-
putAll
void putAll(K k, Collection<V> vs)
Put multiple pairs.- Parameters:
k
- keyvs
- values
-
get
Collection<V> get(K key)
Get all values associated with the key- Parameters:
key
- key- Returns:
- collection of values
-
entrySet
Collection<Map.Entry<K,Collection<V>>> entrySet()
Get all associations of the multimap. The method is intended for read-only view.- Returns:
- entry set of the multimap
-
isEmpty
boolean isEmpty()
Checks if multimap is empty- Returns:
- true, if empty
-
clear
void clear()
Clears the multimap
-
keys
Collection<K> keys()
Keys in the map- Returns:
- collection of keys
-
values
Collection<V> values()
-
remove
void remove(K key)
-
-