| java.lang.Object org.openlaszlo.utils.MultiMap
MultiMap | public class MultiMap implements Map(Code) | | Partial implementation of a map that stores multiple values for a single
key.
|
Method Summary | |
public void | clear() Unsupported. | public boolean | containsKey(Object key) Returns true if this map contains a mapping for the specified key. | public boolean | containsValue(Object value) Returns true if this map maps one or more keys to the
specified value. | public Set | entrySet() Returns a set view of the mappings contained in this map. | public Object | get(Object key) Returns the set of values to which the specified key is mapped in this
multimap. | public boolean | isEmpty() Returns true if this map contains no key-value mappings. | public Set | keySet() Returns a Set view of the keys contained in this Hashtable. | public Object | put(Object key, Object val) Maps the specified key to the specified value in this map. | public void | putAll(Map m) Unsupported. | public Object | remove(Object key, Object val) Remove a particular value associated with key. | public Object | remove(Object key) Remove all values associated with key. | public Set | removeValue(Object value) Remove value from map and return keys this value was associated with. | public int | size() Returns the number of key-set mappings in this map. | public Collection | values() Returns a Collection view of the values contained in this Hashtable. |
mTable | Hashtable mTable(Code) | | Table to store information; each node may hold multiple values
|
clear | public void clear()(Code) | | Unsupported.
|
containsKey | public boolean containsKey(Object key)(Code) | | Returns true if this map contains a mapping for the specified key.
Parameters: key - key whose presence in this map is to be tested true if this map contains a mapping for the specified key. |
containsValue | public boolean containsValue(Object value)(Code) | | Returns true if this map maps one or more keys to the
specified value. More formally, returns true if and only if this map
contains at least one mapping to a value v such that (value==null ?
v==null : value.equals(v)) . This operation will probably require
time linear in the map size for most implementations of the Map
interface.
Parameters: value - value whose presence in this map is to be tested true if this map maps one or more keys to thespecified value |
entrySet | public Set entrySet()(Code) | | Returns a set view of the mappings contained in this map. Each element
in the returned set is a Map.Entry. The set is backed by the map, so
changes to the map are reflected in the set, and vice-versa. If the map
is modified while an iteration over the set is in progress, the results
of the iteration are undefined. The set supports element removal, which
removes the corresponding mapping from the map, via the Iterator.remove,
Set.remove, removeAll, retainAll and clear operations. It does not
support the add or addAll operations.
a set view of the mappings contained in this map |
get | public Object get(Object key)(Code) | | Returns the set of values to which the specified key is mapped in this
multimap.
Parameters: key - key in the map set of values to which the specified key is mapped; null if noneis found |
isEmpty | public boolean isEmpty()(Code) | | Returns true if this map contains no key-value mappings.
true if this map contains no key-value mappings |
keySet | public Set keySet()(Code) | | Returns a Set view of the keys contained in this Hashtable. The Set is
backed by the Hashtable, so changes to the Hashtable are reflected in the
Set, and vice-versa. The Set supports element removal (which removes the
corresponding entry from the Hashtable), but not element addition.
|
put | public Object put(Object key, Object val)(Code) | | Maps the specified key to the specified value in this map. The key
and value may not be null.
Parameters: key - the map key Parameters: val - the value the set that val was added to |
putAll | public void putAll(Map m)(Code) | | Unsupported.
|
remove | public Object remove(Object key, Object val)(Code) | | Remove a particular value associated with key.
Parameters: key - the key to check for associated value Parameters: val - the actual value to remove the value to which the key had be mapped in this mulimap ornull, if the key did not have a mapping |
remove | public Object remove(Object key)(Code) | | Remove all values associated with key.
Parameters: key - the key to remove the set of values removed that were associated with key |
removeValue | public Set removeValue(Object value)(Code) | | Remove value from map and return keys this value was associated with.
Parameters: value - value to remove set of keys associated with removed value; null, if none wasfound |
size | public int size()(Code) | | Returns the number of key-set mappings in this map. If the map contains
more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.
the number of key-value mappings in this map |
values | public Collection values()(Code) | | Returns a Collection view of the values contained in this Hashtable. The
Collection is backed by the Hashtable, so changes to the Hashtable are
reflected in the Collection, and vice-versa. The Collection supports
element removal (which removes the corresponding entry from the
Hashtable), but not element addition.
a collection view of the values contained in this map |
|
|