org.apache.commons.collections.set

Class UnmodifiableSortedSet

public final class UnmodifiableSortedSet extends AbstractSortedSetDecorator 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: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $

Author: Stephen Colebourne

Method Summary
booleanadd(Object object)
booleanaddAll(Collection coll)
voidclear()
static SortedSetdecorate(SortedSet set)
Factory method to create an unmodifiable set.
SortedSetheadSet(Object toElement)
Iteratoriterator()
booleanremove(Object object)
booleanremoveAll(Collection coll)
booleanretainAll(Collection coll)
SortedSetsubSet(Object fromElement, Object toElement)
SortedSettailSet(Object fromElement)

Method Detail

add

public boolean add(Object object)

addAll

public boolean addAll(Collection coll)

clear

public void clear()

decorate

public static SortedSet decorate(SortedSet set)
Factory method to create an unmodifiable set.

Parameters: set the set to decorate, must not be null

Throws: IllegalArgumentException if set is null

headSet

public SortedSet headSet(Object toElement)

iterator

public Iterator iterator()

remove

public boolean remove(Object object)

removeAll

public boolean removeAll(Collection coll)

retainAll

public boolean retainAll(Collection coll)

subSet

public SortedSet subSet(Object fromElement, Object toElement)

tailSet

public SortedSet tailSet(Object fromElement)
Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.