Package com.mckoi.util
Class HashMapList
java.lang.Object
com.mckoi.util.HashMapList
A HashMap that maps from a source to a list of items for that source. This
is useful as a searching mechanism where the list of searched items are
catagorised in the mapped list.
- Author:
- Tobias Downer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClears the all the values for the given key.boolean
containsKey
(Object key) Returns true if the map contains the key.Returns the list of values that are in the map under this key.keySet()
The Set of all keys.void
Puts a value into the map list.boolean
Removes the given value from the list with the given key.
-
Constructor Details
-
HashMapList
public HashMapList()Constructs the map.
-
-
Method Details
-
put
Puts a value into the map list. -
get
Returns the list of values that are in the map under this key. Returns an empty list if no key map found. -
remove
Removes the given value from the list with the given key. -
clear
Clears the all the values for the given key. Returns the List of items that were stored under this key. -
keySet
The Set of all keys. -
containsKey
Returns true if the map contains the key.
-