org.apache.commons.collections4.set
Class AbstractSortedSetDecorator<E>
java.lang.Object
org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>
org.apache.commons.collections4.set.AbstractSetDecorator<E>
org.apache.commons.collections4.set.AbstractSortedSetDecorator<E>
- Type Parameters:
E
- the type of the elements in the sorted set
- All Implemented Interfaces:
- Serializable, Iterable<E>, Collection<E>, Set<E>, SortedSet<E>
- Direct Known Subclasses:
- UnmodifiableSortedSet
public abstract class AbstractSortedSetDecorator<E>
- extends AbstractSetDecorator<E>
- implements SortedSet<E>
Decorates another SortedSet
to provide additional behaviour.
Methods are forwarded directly to the decorated set.
- Since:
- 3.0
- Version:
- $Id: AbstractSortedSetDecorator.java 1477756 2013-04-30 18:31:13Z tn $
- See Also:
- Serialized Form
Methods inherited from class org.apache.commons.collections4.collection.AbstractCollectionDecorator |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, setCollection, size, toArray, toArray, toString |
Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
AbstractSortedSetDecorator
protected AbstractSortedSetDecorator()
- Constructor only used in deserialization, do not use otherwise.
- Since:
- 3.1
AbstractSortedSetDecorator
protected AbstractSortedSetDecorator(Set<E> set)
- Constructor that wraps (not copies).
- Parameters:
set
- the set to decorate, must not be null
- Throws:
IllegalArgumentException
- if set is null
decorated
protected SortedSet<E> decorated()
- Gets the set being decorated.
- Overrides:
decorated
in class AbstractSetDecorator<E>
- Returns:
- the decorated set
subSet
public SortedSet<E> subSet(E fromElement,
E toElement)
- Specified by:
subSet
in interface SortedSet<E>
headSet
public SortedSet<E> headSet(E toElement)
- Specified by:
headSet
in interface SortedSet<E>
tailSet
public SortedSet<E> tailSet(E fromElement)
- Specified by:
tailSet
in interface SortedSet<E>
first
public E first()
- Specified by:
first
in interface SortedSet<E>
last
public E last()
- Specified by:
last
in interface SortedSet<E>
comparator
public Comparator<? super E> comparator()
- Specified by:
comparator
in interface SortedSet<E>
Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.