public abstract class UnmodifiableMultiMap<K,V> extends UnmodifiableMap<K,V> implements MultiMap<K,V>
UnmodifiableMultiMap is an abstract superclass to
save developers the trouble of implementing the various mutator
methds of the MultiMap interface.| Modifier | Constructor and Description |
|---|---|
protected |
UnmodifiableMultiMap() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(K key,
V value)
Throws
UnsupportedOperationException. |
boolean |
addAll(K key,
java.util.Collection<? extends V> values)
Throws
UnsupportedOperationException. |
boolean |
addAll(MultiMap<? extends K,? extends V> mm)
Throws
UnsupportedOperationException. |
boolean |
contains(java.lang.Object a,
java.lang.Object b)
Returns true if
a has a mapping to b
in this. |
abstract UnmodifiableMultiMapSet<K,V> |
entrySet()
Returns a
Set view that allows you to recapture
the MultiMap view. |
java.util.Collection<V> |
getValues(K key)
Returns the collection of Values associated with
key. |
static <K,V> MultiMap<K,V> |
proxy(MultiMap<K,V> mmap)
Constructs and returns an unmodifiable
MultiMap
backed by mmap. |
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Throws
UnsupportedOperationException. |
boolean |
removeAll(K key,
java.util.Collection<?> values)
Throws
UnsupportedOperationException. |
boolean |
retainAll(K key,
java.util.Collection<?> values)
Throws
UnsupportedOperationException. |
protected abstract MultiMap<K,V> |
wrapped() |
clear, keySet, proxy, put, putAll, remove, valuescontainsKey, containsValue, equals, get, hashCode, isEmpty, size, toStringpublic static <K,V> MultiMap<K,V> proxy(MultiMap<K,V> mmap)
MultiMap
backed by mmap.public abstract UnmodifiableMultiMapSet<K,V> entrySet()
Set view that allows you to recapture
the MultiMap view.public java.util.Collection<V> getValues(K key)
MultiMapkey. Modifications to the returned
Collection affect this as well. If
there are no Values currently associated with
key, constructs a new, potentially mutable, empty
Collection and returns it.
(MultiMap specific operation).public boolean contains(java.lang.Object a,
java.lang.Object b)
MultiMappublic boolean remove(java.lang.Object key,
java.lang.Object value)
UnsupportedOperationException.public boolean addAll(K key, java.util.Collection<? extends V> values)
UnsupportedOperationException.public boolean addAll(MultiMap<? extends K,? extends V> mm)
UnsupportedOperationException.public boolean retainAll(K key, java.util.Collection<?> values)
UnsupportedOperationException.Copyright (c) 2006 C. Scott Ananian