Class TransformedNavigableSet<E>
java.lang.Object
org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>
org.apache.commons.collections4.collection.TransformedCollection<E>
org.apache.commons.collections4.set.TransformedSet<E>
org.apache.commons.collections4.set.TransformedSortedSet<E>
org.apache.commons.collections4.set.TransformedNavigableSet<E>
- Type Parameters:
E
- the type of the elements in this set
- All Implemented Interfaces:
Serializable
,Iterable<E>
,Collection<E>
,NavigableSet<E>
,Set<E>
,SortedSet<E>
Decorates another
NavigableSet
to transform objects that are added.
The add methods are affected by this class. Thus objects must be removed or searched for using their transformed form. For example, if the transformation converts Strings to Integers, you must use the Integer form to remove objects.
- Since:
- 4.1
- See Also:
-
Field Summary
Fields inherited from class org.apache.commons.collections4.collection.TransformedCollection
transformer
-
Constructor Summary
ModifierConstructorDescriptionprotected
TransformedNavigableSet
(NavigableSet<E> set, Transformer<? super E, ? extends E> transformer) Constructor that wraps (not copies). -
Method Summary
Modifier and TypeMethodDescriptionprotected NavigableSet
<E> Gets the decorated navigable set.pollLast()
static <E> TransformedNavigableSet
<E> transformedNavigableSet
(NavigableSet<E> set, Transformer<? super E, ? extends E> transformer) Factory method to create a transforming navigable set that will transform existing contents of the specified navigable set.static <E> TransformedNavigableSet
<E> transformingNavigableSet
(NavigableSet<E> set, Transformer<? super E, ? extends E> transformer) Factory method to create a transforming navigable set.Methods inherited from class org.apache.commons.collections4.set.TransformedSortedSet
comparator, first, getSortedSet, headSet, last, subSet, tailSet, transformedSortedSet, transformingSortedSet
Methods inherited from class org.apache.commons.collections4.set.TransformedSet
equals, hashCode, transformedSet, transformingSet
Methods inherited from class org.apache.commons.collections4.collection.TransformedCollection
add, addAll, transform, transform, transformedCollection, transformingCollection
Methods inherited from class org.apache.commons.collections4.collection.AbstractCollectionDecorator
clear, contains, containsAll, isEmpty, iterator, remove, removeAll, removeIf, 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
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 Details
-
Method Details
-
ceiling
- Specified by:
ceiling
in interfaceNavigableSet<E>
-
decorated
Gets the decorated navigable set.- Overrides:
decorated
in classAbstractCollectionDecorator<E>
- Returns:
- the decorated navigable set
-
descendingIterator
- Specified by:
descendingIterator
in interfaceNavigableSet<E>
-
descendingSet
- Specified by:
descendingSet
in interfaceNavigableSet<E>
-
floor
- Specified by:
floor
in interfaceNavigableSet<E>
-
headSet
- Specified by:
headSet
in interfaceNavigableSet<E>
-
higher
- Specified by:
higher
in interfaceNavigableSet<E>
-
lower
- Specified by:
lower
in interfaceNavigableSet<E>
-
pollFirst
- Specified by:
pollFirst
in interfaceNavigableSet<E>
-
pollLast
- Specified by:
pollLast
in interfaceNavigableSet<E>
-
subSet
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) - Specified by:
subSet
in interfaceNavigableSet<E>
-
tailSet
- Specified by:
tailSet
in interfaceNavigableSet<E>