org.apache.commons.collections.set
Class UnmodifiableSortedSet<E>
java.lang.Object
org.apache.commons.collections.collection.AbstractCollectionDecorator<E>
org.apache.commons.collections.set.AbstractSetDecorator<E>
org.apache.commons.collections.set.AbstractSortedSetDecorator<E>
org.apache.commons.collections.set.UnmodifiableSortedSet<E>
- All Implemented Interfaces:
- Serializable, Iterable<E>, Collection<E>, Set<E>, SortedSet<E>, Unmodifiable
public final class UnmodifiableSortedSet<E>
- extends AbstractSortedSetDecorator<E>
- implements Unmodifiable, Serializable
Decorates another SortedSet
to ensure it can't be altered.
This class is Serializable from Commons Collections 3.1.
- Since:
- Commons Collections 3.0
- Version:
- $Revision: 1.1.1.1 $ $Date: 2005/05/23 04:36:27 $
- Author:
- Matt Hall, John Watkinson, Stephen Colebourne
- See Also:
- Serialized Form
decorate
public static <E> SortedSet<E> decorate(SortedSet<E> set)
- Factory method to create an unmodifiable set.
- Parameters:
set
- the set to decorate, must not be null
- Throws:
IllegalArgumentException
- if set is null
iterator
public Iterator<E> iterator()
- Specified by:
iterator
in interface Iterable<E>
- Specified by:
iterator
in interface Collection<E>
- Specified by:
iterator
in interface Set<E>
- Overrides:
iterator
in class AbstractCollectionDecorator<E>
add
public boolean add(E object)
- Specified by:
add
in interface Collection<E>
- Specified by:
add
in interface Set<E>
- Overrides:
add
in class AbstractCollectionDecorator<E>
addAll
public boolean addAll(Collection<? extends E> coll)
- Specified by:
addAll
in interface Collection<E>
- Specified by:
addAll
in interface Set<E>
- Overrides:
addAll
in class AbstractCollectionDecorator<E>
clear
public void clear()
- Specified by:
clear
in interface Collection<E>
- Specified by:
clear
in interface Set<E>
- Overrides:
clear
in class AbstractCollectionDecorator<E>
remove
public boolean remove(Object object)
- Specified by:
remove
in interface Collection<E>
- Specified by:
remove
in interface Set<E>
- Overrides:
remove
in class AbstractCollectionDecorator<E>
removeAll
public boolean removeAll(Collection<?> coll)
- Specified by:
removeAll
in interface Collection<E>
- Specified by:
removeAll
in interface Set<E>
- Overrides:
removeAll
in class AbstractCollectionDecorator<E>
retainAll
public boolean retainAll(Collection<?> coll)
- Specified by:
retainAll
in interface Collection<E>
- Specified by:
retainAll
in interface Set<E>
- Overrides:
retainAll
in class AbstractCollectionDecorator<E>
subSet
public SortedSet<E> subSet(E fromElement,
E toElement)
- Specified by:
subSet
in interface SortedSet<E>
- Overrides:
subSet
in class AbstractSortedSetDecorator<E>
headSet
public SortedSet<E> headSet(E toElement)
- Specified by:
headSet
in interface SortedSet<E>
- Overrides:
headSet
in class AbstractSortedSetDecorator<E>
tailSet
public SortedSet<E> tailSet(E fromElement)
- Specified by:
tailSet
in interface SortedSet<E>
- Overrides:
tailSet
in class AbstractSortedSetDecorator<E>
Copyright © 2005-2005 Apache Software Foundation, Matt Hall, John Watkinson. All Rights Reserved.