K - The type of the keys of the multimap.V - The type of the values of the multimap.public class MultiHashMap<K,V>
extends java.lang.Object
| Red (mankit) |
| Red (mankit) |
| Constructor and Description |
|---|
MultiHashMap() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<V> |
get(K key)
Get the collection of values mapped to by a given key.
|
boolean |
isEmpty()
Return whether or not this multimap is empty.
|
java.util.Set<K> |
keySet()
Return a set of all key values represented by this multimap.
|
void |
put(K key,
V value)
Add the value to the collection associated with the specified key.
|
boolean |
remove(K key,
V value)
Remove a specified value from the map.
|
int |
size(java.lang.Object key)
Return the size of the collection mapped to the specified key.
|
java.util.Collection<V> |
values()
Return a view of the collection containing all values in the map.
|
public java.util.Collection<V> get(K key)
key - The index into the multimap.public java.util.Set<K> keySet()
public boolean isEmpty()
public void put(K key, V value)
key - The specified key.value - The specified value to add to the collection.public boolean remove(K key, V value)
key - The specified key to remove the value from.value - The specified value to remove.public int size(java.lang.Object key)
key - The specified key.public java.util.Collection<V> values()