Package org.drasyl.util
Class HashSetMultimap<K,V>
java.lang.Object
org.drasyl.util.HashSetMultimap<K,V>
- Type Parameters:
K- the type of keys maintained by this mapV- the type of mapped values
- All Implemented Interfaces:
Multimap<K,,V> SetMultimap<K,V>
Hash table based implementation of the
SetMultimap interface.
This data structure is not thread-safe!
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
HashSetMultimap
public HashSetMultimap(int initialMapCapacity, int initialSetCapacity) -
HashSetMultimap
public HashSetMultimap()
-
-
Method Details
-
put
Description copied from interface:MultimapAssociates the specifiedvaluewith the specifiedkeyin this map. -
remove
Description copied from interface:MultimapRemoves the specifiedvaluefrom the specifiedkey. If no value left, the associatedkeywill be removed from the map. -
get
Description copied from interface:MultimapReturns the values that are associated to the specifiedkey. Returns a emptyCollectionif currently no values are assosicated to thekey.- Specified by:
getin interfaceMultimap<K,V> - Specified by:
getin interfaceSetMultimap<K,V> - Parameters:
key- the key whose associated values should be returned- Returns:
- the values that are associated to the specified
key. Returns a emptyCollectionif currently no values are assosicated to thekey.
-
keySet
Description copied from interface:MultimapReturns aSetwith all the keys contained in this map.
-