net.cscott.jutil

Class 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.

Version: $Id: UnmodifiableMultiMap.java,v 1.5 2006-10-30 19:58:07 cananian Exp $

Author: Felix S. Klock II

Constructor Summary
protected UnmodifiableMultiMap()
Method Summary
booleanadd(K key, V value)
Throws UnsupportedOperationException.
booleanaddAll(K key, Collection<? extends V> values)
Throws UnsupportedOperationException.
booleanaddAll(MultiMap<? extends K,? extends V> mm)
Throws UnsupportedOperationException.
booleancontains(Object a, Object b)
abstract UnmodifiableMultiMapSet<K,V>entrySet()
Returns a Set view that allows you to recapture the MultiMap view.
Collection<V>getValues(K key)
static <K,V> MultiMap<K,V>proxy(MultiMap<K,V> mmap)
Constructs and returns an unmodifiable MultiMap backed by mmap.
booleanremove(Object key, Object value)
Throws UnsupportedOperationException.
booleanremoveAll(K key, Collection<?> values)
Throws UnsupportedOperationException.
booleanretainAll(K key, Collection<?> values)
Throws UnsupportedOperationException.
protected abstract MultiMap<K,V>wrapped()

Constructor Detail

UnmodifiableMultiMap

protected UnmodifiableMultiMap()

Method Detail

add

public boolean add(K key, V value)
Throws UnsupportedOperationException.

addAll

public boolean addAll(K key, Collection<? extends V> values)
Throws UnsupportedOperationException.

addAll

public boolean addAll(MultiMap<? extends K,? extends V> mm)
Throws UnsupportedOperationException.

contains

public boolean contains(Object a, Object b)

entrySet

public abstract UnmodifiableMultiMapSet<K,V> entrySet()
Returns a Set view that allows you to recapture the MultiMap view.

getValues

public Collection<V> getValues(K key)

proxy

public static <K,V> MultiMap<K,V> proxy(MultiMap<K,V> mmap)
Constructs and returns an unmodifiable MultiMap backed by mmap.

remove

public boolean remove(Object key, Object value)
Throws UnsupportedOperationException.

removeAll

public boolean removeAll(K key, Collection<?> values)
Throws UnsupportedOperationException.

retainAll

public boolean retainAll(K key, Collection<?> values)
Throws UnsupportedOperationException.

wrapped

protected abstract MultiMap<K,V> wrapped()
Copyright (c) 2006 C. Scott Ananian