Class AbstractNavigableSetDecorator<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>
-
- org.apache.commons.collections4.set.AbstractNavigableSetDecorator<E>
-
- Type Parameters:
E
- the type of the elements in the navigable set
- All Implemented Interfaces:
Serializable
,Iterable<E>
,Collection<E>
,NavigableSet<E>
,Set<E>
,SortedSet<E>
- Direct Known Subclasses:
UnmodifiableNavigableSet
public abstract class AbstractNavigableSetDecorator<E> extends AbstractSortedSetDecorator<E> implements NavigableSet<E>
Decorates anotherNavigableSet
to provide additional behaviour.Methods are forwarded directly to the decorated set.
- Since:
- 4.1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNavigableSetDecorator()
Constructor only used in deserialization, do not use otherwise.protected
AbstractNavigableSetDecorator(NavigableSet<E> set)
Constructor that wraps (not copies).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
ceiling(E e)
protected NavigableSet<E>
decorated()
Gets the set being decorated.Iterator<E>
descendingIterator()
NavigableSet<E>
descendingSet()
E
floor(E e)
NavigableSet<E>
headSet(E toElement, boolean inclusive)
E
higher(E e)
E
lower(E e)
E
pollFirst()
E
pollLast()
NavigableSet<E>
subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
NavigableSet<E>
tailSet(E fromElement, boolean inclusive)
-
Methods inherited from class org.apache.commons.collections4.set.AbstractSortedSetDecorator
comparator, first, headSet, last, subSet, tailSet
-
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.NavigableSet
headSet, iterator, subSet, tailSet
-
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
-
Methods inherited from interface java.util.SortedSet
comparator, first, last, spliterator
-
-
-
-
Constructor Detail
-
AbstractNavigableSetDecorator
protected AbstractNavigableSetDecorator()
Constructor only used in deserialization, do not use otherwise.
-
AbstractNavigableSetDecorator
protected AbstractNavigableSetDecorator(NavigableSet<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 NavigableSet<E> decorated()
Gets the set being decorated.- Overrides:
decorated
in classAbstractSortedSetDecorator<E>
- Returns:
- the decorated set
-
lower
public E lower(E e)
- Specified by:
lower
in interfaceNavigableSet<E>
-
floor
public E floor(E e)
- Specified by:
floor
in interfaceNavigableSet<E>
-
ceiling
public E ceiling(E e)
- Specified by:
ceiling
in interfaceNavigableSet<E>
-
higher
public E higher(E e)
- Specified by:
higher
in interfaceNavigableSet<E>
-
pollFirst
public E pollFirst()
- Specified by:
pollFirst
in interfaceNavigableSet<E>
-
pollLast
public E pollLast()
- Specified by:
pollLast
in interfaceNavigableSet<E>
-
descendingSet
public NavigableSet<E> descendingSet()
- Specified by:
descendingSet
in interfaceNavigableSet<E>
-
descendingIterator
public Iterator<E> descendingIterator()
- Specified by:
descendingIterator
in interfaceNavigableSet<E>
-
subSet
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
- Specified by:
subSet
in interfaceNavigableSet<E>
-
headSet
public NavigableSet<E> headSet(E toElement, boolean inclusive)
- Specified by:
headSet
in interfaceNavigableSet<E>
-
tailSet
public NavigableSet<E> tailSet(E fromElement, boolean inclusive)
- Specified by:
tailSet
in interfaceNavigableSet<E>
-
-