E
- the type of the elements in the sorted setpublic abstract class AbstractSortedSetDecorator<E> extends AbstractSetDecorator<E> implements SortedSet<E>
SortedSet
to provide additional behaviour.
Methods are forwarded directly to the decorated set.
Modifier | Constructor and Description |
---|---|
protected |
AbstractSortedSetDecorator()
Constructor only used in deserialization, do not use otherwise.
|
protected |
AbstractSortedSetDecorator(Set<E> set)
Constructor that wraps (not copies).
|
Modifier and Type | Method and 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) |
equals, hashCode
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, setCollection, size, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
spliterator
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
parallelStream, removeIf, stream
protected AbstractSortedSetDecorator()
protected AbstractSortedSetDecorator(Set<E> set)
set
- the set to decorate, must not be nullNullPointerException
- if set is nullprotected SortedSet<E> decorated()
decorated
in class AbstractSetDecorator<E>
public Comparator<? super E> comparator()
comparator
in interface SortedSet<E>
Copyright © 2001–2018 The Apache Software Foundation. All rights reserved.