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.
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Hides org. |
| Access | Constructor and Description |
|---|---|
| protected | TransformedNavigableSet(final NavigableSet<E>
the set to decorate, must not be null set, final Transformer<? super E, ? extends E> the transformer to use for conversion, must not be null transformer)Constructor that wraps (not copies). |
| Modifier and Type | Method and Description |
|---|---|
| public E | ceiling(final E
the value to match e)Implements java. null if there is no such element.
|
| protected NavigableSet | Returns: the decorated navigable setOverrides org. |
| public Iterator | descendingIterator()
Implements java. |
| public NavigableSet | descendingSet()
Implements java. |
| public E | floor(final E
the value to match e)Implements java. null if there is no such element.
|
| public NavigableSet | headSet(final E
high endpoint of the returned set toElement, final boolean true if the high endpoint
is to be included in the returned viewImplements java. inclusive is true) toElement.
|
| public E | higher(final E
the value to match e)Implements java. null if there is no such element.
|
| public E | lower(final E
the value to match e)Implements java. null if there is no such element.
|
| public E | pollFirst()
Implements java. null if this set is empty.
|
| public E | pollLast()
Implements java. null if this set is empty.
|
| public NavigableSet | subSet(final E
low endpoint of the returned set fromElement, final boolean true if the low endpoint
is to be included in the returned viewhigh endpoint of the returned set toElement, final boolean true if the high endpoint
is to be included in the returned viewImplements java. fromElement to toElement.
|
| public NavigableSet | tailSet(final E
low endpoint of the returned set fromElement, final boolean true if the low endpoint
is to be included in the returned viewImplements java. inclusive is true) fromElement.
|
| public static < the element type E> TransformedNavigableSet | Returns: a new transformedNavigableSetthe set to decorate, must not be null set, final Transformer<? super E, ? extends E> the transformer to use for conversion, must not be null transformer)Factory method to create a transforming navigable set that will transform existing contents of the specified navigable set. |
| public static < the element type E> TransformedNavigableSet | Returns: a new transformedNavigableSetthe set to decorate, must not be null set, final Transformer<? super E, ? extends E> the transformer to use for conversion, must not be null transformer)Factory method to create a transforming navigable set. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. Serialization version | |
| TransformedNavigableSet | back to summary |
|---|---|
| protected TransformedNavigableSet(final NavigableSet<E> set, final Transformer<? super E, ? extends E> transformer) Constructor that wraps (not copies). If there are any elements already in the set being decorated, they are NOT transformed.
| |
| ceiling | back to summary |
|---|---|
| public E ceiling(final E e) Implements java. Doc from java. Returns the least element in this set greater than or equal to
the given element, or
| |
| decorated | back to summary |
|---|---|
| protected NavigableSet Overrides org. Gets the decorated navigable set.
| |
| descendingIterator | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns an iterator over the elements in this set, in descending order.
Equivalent in effect to | |
| descendingSet | back to summary |
|---|---|
| public NavigableSet Implements java. Doc from java. Returns a reverse order view of the elements contained in this set.
The descending set is backed by this set, so changes to the set are
reflected in the descending set, and vice-versa. If either set is
modified while an iteration over either set is in progress (except
through the iterator's own The returned set has an ordering equivalent to
| |
| floor | back to summary |
|---|---|
| public E floor(final E e) Implements java. Doc from java. Returns the greatest element in this set less than or equal to
the given element, or
| |
| headSet | back to summary |
|---|---|
| public NavigableSet Implements java. Doc from java. Returns a view of the portion of this set whose elements are less than
(or equal to, if The returned set will throw an
| |
| higher | back to summary |
|---|---|
| public E higher(final E e) Implements java. Doc from java. Returns the least element in this set strictly greater than the
given element, or
| |
| lower | back to summary |
|---|---|
| public E lower(final E e) Implements java. Doc from java. Returns the greatest element in this set strictly less than the
given element, or
| |
| pollFirst | back to summary |
|---|---|
| public E pollFirst() Implements java. Doc from java. Retrieves and removes the first (lowest) element,
or returns
| |
| pollLast | back to summary |
|---|---|
| public E pollLast() Implements java. Doc from java. Retrieves and removes the last (highest) element,
or returns
| |
| subSet | back to summary |
|---|---|
| public NavigableSet Implements java. Doc from java. Returns a view of the portion of this set whose elements range from
The returned set will throw an
| |
| tailSet | back to summary |
|---|---|
| public NavigableSet Implements java. Doc from java. Returns a view of the portion of this set whose elements are greater
than (or equal to, if The returned set will throw an
| |
| transformedNavigableSet | back to summary |
|---|---|
| public static <E> TransformedNavigableSet Factory method to create a transforming navigable set that will transform existing contents of the specified navigable set.
If there are any elements already in the set being decorated, they
will be transformed by this method.
Contrast this with
| |
| transformingNavigableSet | back to summary |
|---|---|
| public static <E> TransformedNavigableSet Factory method to create a transforming navigable set.
If there are any elements already in the set being decorated, they
are NOT transformed.
Contrast this with
| |