net.cscott.jutil
Class UnmodifiableMapSet<K,V>
java.lang.Object
net.cscott.jutil.CollectionWrapper<E>
net.cscott.jutil.SetWrapper<Map.Entry<K,V>>
net.cscott.jutil.UnmodifiableMapSet<K,V>
- All Implemented Interfaces:
- Iterable<Map.Entry<K,V>>, Collection<Map.Entry<K,V>>, Set<Map.Entry<K,V>>, MapSet<K,V>
- Direct Known Subclasses:
- UnmodifiableMultiMapSet
public abstract class UnmodifiableMapSet<K,V>
- extends SetWrapper<Map.Entry<K,V>>
UnmodifiableMapSet prevents mutation of a wrapped
MapSet.
- Version:
- $Id: UnmodifiableMapSet.java,v 1.1 2006-10-29 20:15:47 cananian Exp $
- Author:
- C. Scott Ananian
UnmodifiableMapSet
protected UnmodifiableMapSet()
wrapped
protected abstract MapSet<K,V> wrapped()
- Implementations should return the wrapped
MapSet here.
- Specified by:
wrapped in class SetWrapper<Map.Entry<K,V>>
asMap
public abstract UnmodifiableMap<K,V> asMap()
iterator
public Iterator<Map.Entry<K,V>> iterator()
- Specified by:
iterator in interface Iterable<Map.Entry<K,V>>- Specified by:
iterator in interface Collection<Map.Entry<K,V>>- Specified by:
iterator in interface Set<Map.Entry<K,V>>- Overrides:
iterator in class CollectionWrapper<Map.Entry<K,V>>
add
public boolean add(Map.Entry<K,V> o)
- Specified by:
add in interface Collection<Map.Entry<K,V>>- Specified by:
add in interface Set<Map.Entry<K,V>>- Overrides:
add in class CollectionWrapper<Map.Entry<K,V>>
addAll
public boolean addAll(Collection<? extends Map.Entry<K,V>> c)
- Specified by:
addAll in interface Collection<Map.Entry<K,V>>- Specified by:
addAll in interface Set<Map.Entry<K,V>>- Overrides:
addAll in class CollectionWrapper<Map.Entry<K,V>>
clear
public void clear()
- Specified by:
clear in interface Collection<Map.Entry<K,V>>- Specified by:
clear in interface Set<Map.Entry<K,V>>- Overrides:
clear in class CollectionWrapper<Map.Entry<K,V>>
remove
public boolean remove(Object o)
- Specified by:
remove in interface Collection<Map.Entry<K,V>>- Specified by:
remove in interface Set<Map.Entry<K,V>>- Overrides:
remove in class CollectionWrapper<Map.Entry<K,V>>
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll in interface Collection<Map.Entry<K,V>>- Specified by:
removeAll in interface Set<Map.Entry<K,V>>- Overrides:
removeAll in class CollectionWrapper<Map.Entry<K,V>>
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll in interface Collection<Map.Entry<K,V>>- Specified by:
retainAll in interface Set<Map.Entry<K,V>>- Overrides:
retainAll in class CollectionWrapper<Map.Entry<K,V>>
Copyright (c) 2006 C. Scott Ananian