net.cscott.jutil
public abstract class AbstractMultiMap<K,V> extends AbstractMap<K,V> implements MultiMap<K,V>
Version: $Id: AbstractMultiMap.java,v 1.5 2006-10-30 21:58:57 cananian Exp $
Method Summary | |
---|---|
boolean | add(K key, V value) Ensures that this contains an association from
key to value .
|
boolean | addAll(K key, Collection<? extends V> values) Adds to the current mappings: associations for
key to each value in values .
|
boolean | addAll(MultiMap<? extends K,? extends V> mm) Add all mappings in the given multimap to this multimap. |
abstract void | clear() |
abstract boolean | contains(Object a, Object b) |
boolean | containsKey(Object key) |
boolean | containsValue(Object value) |
abstract MultiMapSet<K,V> | entrySet() |
boolean | equals(Object o) |
V | get(Object key) |
abstract Collection<V> | getValues(K key) |
int | hashCode() |
boolean | isEmpty() |
V | put(K key, V value) Associates the specified value with the specified key in this
map. |
void | putAll(Map<? extends K,? extends V> t) Copies the mappings from the specified map to this
map. |
abstract V | remove(Object key) |
abstract boolean | remove(Object key, Object value) |
boolean | removeAll(K key, Collection<?> values) Removes from the current mappings: associations for
key to any value in values .
|
boolean | retainAll(K key, Collection<?> values) Removes from the current mappings: associations for
key to any value not in values .
|
int | size() |
String | toString() |
this
contains an association from
key
to value
.
(MultiMap specific operation).Returns: true
if this mapping changed as a result of
the call
key
to each value in values
.
(MultiMap specific operation).Returns: true
if this mapping changed as a result
of the call
null
if no values were associated previously.putAll(mm)
where mm
is a
MultiMap will NOT add all of the mappings in
mm
; it will only add all of the Keys in
mm
, mapping each Key to one of the Values it
mapped to in mm
. To add all of the mappings from
another MultiMap, use
addAll.key
to any value in values
.
(MultiMap specific operation).Returns: true
if this mapping changed as a result
of the call
key
to any value not in values
.
(MultiMap specific operation).Returns: true
if this mapping changed as a result
of the call