|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.util.HashMapMulti<K,V>
public class HashMapMulti<K,V>
A hashtable-like collection that maps each key to a set of items rather than to a single item.
| Constructor Summary | |
|---|---|
HashMapMulti()
Construct an empty map. |
|
| Method Summary | |
|---|---|
void |
add(K key,
V value)
Add a value to a key's value set. |
boolean |
containsKey(K key)
Test if this map has a mapping for a given key. |
HashSetMulti<V> |
getMulti(K key)
Return the set of values for some key. |
Set<K> |
keys()
Get the set of keys for this map. |
void |
remove(K key)
Remove a key's entire value set. |
void |
remove(K key,
V value)
Remove a value from a key's value set. |
Iterable<V> |
values()
Return an iterable that can iterate over all the values of all the keys in this map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HashMapMulti()
| Method Detail |
|---|
public void add(K key,
V value)
key - The key for the value to add.value - The value that should be added to 'key's value setpublic boolean containsKey(K key)
key - The key whose potential mapping is of interest.
public HashSetMulti<V> getMulti(K key)
key - The key for the set of values desired.
public Set<K> keys()
public void remove(K key,
V value)
key - The key for the value set to remove from.value - The value that should be removed from 'key's value
setpublic void remove(K key)
key - The key for the set of values to remove.public Iterable<V> values()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||