|
JUtil | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.cscott.jutil.MapWrapper<K,V>
net.cscott.jutil.UnmodifiableMap<K,V>
net.cscott.jutil.UnmodifiableMultiMap<K,V>
public abstract class UnmodifiableMultiMap<K,V>
UnmodifiableMultiMap is an abstract superclass to
save developers the trouble of implementing the various mutator
methds of the MultiMap interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
protected |
UnmodifiableMultiMap()
|
| Method Summary | ||
|---|---|---|
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()
Returns a Set view that allows you to recapture
the MultiMap view. |
|
Collection<V> |
getValues(K key)
Returns the collection of Values associated with key. |
|
static
|
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()
|
|
| Methods inherited from class net.cscott.jutil.UnmodifiableMap |
|---|
clear, keySet, proxy, put, putAll, remove, values |
| Methods inherited from class net.cscott.jutil.MapWrapper |
|---|
containsKey, containsValue, equals, get, hashCode, isEmpty, size, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.cscott.jutil.MultiMap |
|---|
get, put, putAll, remove, size |
| Methods inherited from interface java.util.Map |
|---|
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, values |
| Constructor Detail |
|---|
protected UnmodifiableMultiMap()
| Method Detail |
|---|
protected abstract MultiMap<K,V> wrapped()
wrapped in class MapWrapper<K,V>public 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.
entrySet in interface Map<K,V>entrySet in interface MultiMap<K,V>entrySet in class UnmodifiableMap<K,V>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).
getValues in interface MultiMap<K,V>
public boolean contains(Object a,
Object b)
MultiMapa has a mapping to b
in this.
(MultiMap specific operation).
contains in interface MultiMap<K,V>
public boolean remove(Object key,
Object value)
UnsupportedOperationException.
remove in interface MultiMap<K,V>
public boolean add(K key,
V value)
UnsupportedOperationException.
add in interface MultiMap<K,V>true if this mapping changed as a result of
the call
public boolean addAll(K key,
Collection<? extends V> values)
UnsupportedOperationException.
addAll in interface MultiMap<K,V>true if this mapping changed as a result
of the callpublic boolean addAll(MultiMap<? extends K,? extends V> mm)
UnsupportedOperationException.
addAll in interface MultiMap<K,V>
public boolean retainAll(K key,
Collection<?> values)
UnsupportedOperationException.
retainAll in interface MultiMap<K,V>true if this mapping changed as a result
of the call
public boolean removeAll(K key,
Collection<?> values)
UnsupportedOperationException.
removeAll in interface MultiMap<K,V>true if this mapping changed as a result
of the call
|
JUtil | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||