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:
AbstractNavigableSetDecorator
,UnmodifiableSortedSet
public abstract class AbstractSortedSetDecorator<E> extends AbstractSetDecorator<E> implements SortedSet<E>
Decorates anotherSortedSet
to provide additional behaviour.Methods are forwarded directly to the decorated set.
- Since:
- 3.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSortedSetDecorator()
Constructor only used in deserialization, do not use otherwise.protected
AbstractSortedSetDecorator(Set<E> set)
Constructor that wraps (not copies).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Comparator<? super E>
comparator()
protected SortedSet<E>
decorated()
Gets the set being decorated.E
first()
SortedSet<E>
headSet(E toElement)
E
last()
SortedSet<E>
subSet(E fromElement, E toElement)
SortedSet<E>
tailSet(E fromElement)
-
Methods inherited from class org.apache.commons.collections4.set.AbstractSetDecorator
equals, hashCode
-
Methods inherited from class org.apache.commons.collections4.collection.AbstractCollectionDecorator
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, setCollection, size, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
-
Methods inherited from interface java.util.SortedSet
spliterator
-
-
-
-
Constructor Detail
-
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:
NullPointerException
- if set is null
-
-
Method Detail
-
decorated
protected SortedSet<E> decorated()
Gets the set being decorated.- Overrides:
decorated
in classAbstractSetDecorator<E>
- Returns:
- the decorated set
-
comparator
public Comparator<? super E> comparator()
- Specified by:
comparator
in interfaceSortedSet<E>
-
-