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,
Collection<? extends V> values)
Throws
UnsupportedOperationException. |
boolean |
addAll(MultiMap<? extends K,? extends V> mm)
Throws
UnsupportedOperationException. |
boolean |
contains(Object a,
Object b)
Returns true if
a has a mapping to b
in this. |
abstract UnmodifiableMultiMapSet<K,V> |
entrySet()
|
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(Object key,
Object value)
Throws
UnsupportedOperationException. |
boolean |
removeAll(K key,
Collection<?> values)
Throws
UnsupportedOperationException. |
boolean |
retainAll(K key,
Collection<?> values)
Throws
UnsupportedOperationException. |
protected abstract MultiMap<K,V> |
wrapped() |
clear, keySet, proxy, put, putAll, remove, valuescontainsKey, containsValue, equals, get, hashCode, isEmpty, size, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, replace, replace, replaceAll, valuespublic static <K,V> MultiMap<K,V> proxy(MultiMap<K,V> mmap)
MultiMap
backed by mmap.public abstract UnmodifiableMultiMapSet<K,V> entrySet()
public 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 remove(Object key, Object value)
UnsupportedOperationException.public boolean add(K key, V value)
UnsupportedOperationException.public boolean addAll(K key, Collection<? extends V> values)
UnsupportedOperationException.public boolean addAll(MultiMap<? extends K,? extends V> mm)
UnsupportedOperationException.public boolean retainAll(K key, Collection<?> values)
UnsupportedOperationException.public boolean removeAll(K key, Collection<?> values)
UnsupportedOperationException.Copyright (c) 2006 C. Scott Ananian