public class MultiHashMap<K,V>
MultiHashMap is an implementation of the MultiMap interface. It
associates a collection of objects to each key. Putting a new
object under a key adds to the associated collection. Likewise,
removing a object removes from the collection. It is possible
that the given object to remove is not contained by the collection.
In which case, no changes is made and null is returned. The items
in each collection are ordered by insertion, and duplicates are
stored in the collections.
For example, given a key K and object O1, and O2:
MultiHashMap map = new MultiHashMap();
then, map.size(K) would return 3. Iterating through the map returns
O1, O1, and O2 in order.
Remove a specified value from the map. The value is removed
from the collection mapped to the specified key. If this is
the last value removed from the given key, the specified key
is also removed from the map. Subsequent call to get(key) will
key - The specified key to remove the value from.
value - The specified value to remove.
True, if the value was removed. False, otherwise.
public int size(java.lang.Object key)
Return the size of the collection mapped to the specified key.
key - The specified key.
The size of the collection, or zero if key is
not in the map.