⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
org.apache.commons.collections.set

Class UnmodifiableSortedSet

java.lang.Object
|
+--org.apache.commons.collections.collection.AbstractCollectionDecorator
   |
   +--org.apache.commons.collections.set.AbstractSetDecorator
      |
      +--org.apache.commons.collections.set.AbstractSortedSetDecorator
         |
         +--org.apache.commons.collections.set.UnmodifiableSortedSet

All Implemented Interfaces:
Collection, Unmodifiable, Set, SortedSet


public final class UnmodifiableSortedSet
extends AbstractSortedSetDecorator
implements Unmodifiable

Decorates another SortedSet to ensure it can't be altered.
Since:
Commons Collections 3.0
Author:
Stephen Colebourne

Method Summary

boolean

add(Object object)

boolean

addAll(Collection coll)

void

clear()

static SortedSet

decorate(SortedSet set)

Factory method to create an unmodifiable set.

SortedSet

headSet(Object toElement)

Iterator

iterator()

boolean

remove(Object object)

boolean

removeAll(Collection coll)

boolean

retainAll(Collection coll)

SortedSet

subSet(Object fromElement, Object toElement)

SortedSet

tailSet(Object fromElement)

Method Details

add

public boolean add(Object object)

Parameters:
object

addAll

public boolean addAll(Collection coll)

Parameters:
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:
- if set is null

headSet

public SortedSet headSet(Object toElement)

Parameters:
toElement

iterator

public Iterator iterator()


remove

public boolean remove(Object object)

Parameters:
object

removeAll

public boolean removeAll(Collection coll)

Parameters:
coll

retainAll

public boolean retainAll(Collection coll)

Parameters:
coll

subSet

public SortedSet subSet(Object fromElement, Object toElement)

Parameters:
fromElement
toElement

tailSet

public SortedSet tailSet(Object fromElement)

Parameters:
fromElement