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

Class AbstractSortedSetDecorator

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

All Implemented Interfaces:
Collection, Set, SortedSet

Known Direct Subclasses:
UnmodifiableSortedSet


public abstract class AbstractSortedSetDecorator
extends AbstractSetDecorator
implements SortedSet

Decorates another SortedSet to provide additional behaviour.

Methods are forwarded directly to the decorated set.

Since:
Commons Collections 3.0
Author:
Stephen Colebourne

Constructor Summary

AbstractSortedSetDecorator(Set set)

Constructor that wraps (not copies).

Method Summary

Comparator

comparator()

Object

first()

SortedSet

getSortedSet()

Gets the sorted set being decorated.

SortedSet

headSet(Object toElement)

Object

last()

SortedSet

subSet(Object fromElement, Object toElement)

SortedSet

tailSet(Object fromElement)

Constructor Details

AbstractSortedSetDecorator

protected AbstractSortedSetDecorator(Set set)

Constructor that wraps (not copies).

Parameters:
set - the set to decorate, must not be null
Throws:
- if set is null

Method Details

comparator

public Comparator comparator()


first

public Object first()


getSortedSet

protected SortedSet getSortedSet()

Gets the sorted set being decorated.

Returns:
the decorated set

headSet

public SortedSet headSet(Object toElement)

Parameters:
toElement

last

public Object last()


subSet

public SortedSet subSet(Object fromElement, Object toElement)

Parameters:
fromElement
toElement

tailSet

public SortedSet tailSet(Object fromElement)

Parameters:
fromElement