Package net.cscott.jutil
Class UnmodifiableMultiMap<K,V>
java.lang.Object
net.cscott.jutil.MapWrapper<K,V>
net.cscott.jutil.UnmodifiableMap<K,V>
net.cscott.jutil.UnmodifiableMultiMap<K,V>
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.- Author:
- Felix S. Klock II <pnkfelix@mit.edu>
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanThrowsUnsupportedOperationException.booleanaddAll(K key, Collection<? extends V> values) ThrowsUnsupportedOperationException.booleanThrowsUnsupportedOperationException.booleanReturns true ifahas a mapping tobinthis.abstract UnmodifiableMultiMapSet<K, V> entrySet()Returns the collection of Values associated withkey.static <K,V> MultiMap <K, V> Constructs and returns an unmodifiableMultiMapbacked bymmap.booleanThrowsUnsupportedOperationException.booleanremoveAll(K key, Collection<?> values) ThrowsUnsupportedOperationException.booleanretainAll(K key, Collection<?> values) ThrowsUnsupportedOperationException.wrapped()Implementations should return the wrappedMaphere.Methods inherited from class net.cscott.jutil.UnmodifiableMap
clear, keySet, proxy, put, putAll, remove, valuesMethods inherited from class net.cscott.jutil.MapWrapper
containsKey, containsValue, equals, get, hashCode, isEmpty, size, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, replace, values
-
Constructor Details
-
UnmodifiableMultiMap
protected UnmodifiableMultiMap()
-
-
Method Details
-
wrapped
Description copied from class:MapWrapperImplementations should return the wrappedMaphere.- Specified by:
wrappedin classMapWrapper<K,V>
-
proxy
Constructs and returns an unmodifiableMultiMapbacked bymmap. -
entrySet
-
getValues
Description copied from interface:MultiMapReturns the collection of Values associated withkey. Modifications to the returnedCollectionaffectthisas well. If there are no Values currently associated withkey, constructs a new, potentially mutable, emptyCollectionand returns it. (MultiMapspecific operation). -
contains
Description copied from interface:MultiMap -
remove
ThrowsUnsupportedOperationException. -
add
ThrowsUnsupportedOperationException. -
addAll
ThrowsUnsupportedOperationException. -
addAll
ThrowsUnsupportedOperationException. -
retainAll
ThrowsUnsupportedOperationException. -
removeAll
ThrowsUnsupportedOperationException.
-