package saker.util
public abstract class TransformingNavigableSet<SE, E> extends TransformingSortedSet<SE, E> implements NavigableSet<E>
Pseudo-Set implementation that dynamically generated the elements for it based on the elements of a subject
set.
Works exactly the same way as TransformingSortedSet, but also implements NavigableSet as well.
SEThe source set element type.
EThe element type of this set.
public | TransformingNavigableSet( Creates a new instance with the given set. |
public | TransformingNavigableSet( Creates a new instance with the given set and comparator. |
public E | ceiling( Returns the least element in this set greater than or equal to the given element, or null if there is no
such element. |
public Iterator< | Returns an iterator over the elements in this set, in descending order. |
public NavigableSet< | Returns a reverse order view of the elements contained in this set. |
public E | floor( Returns the greatest element in this set less than or equal to the given element, or null if there is no
such element. |
public NavigableSet< | headSet( Returns a view of the portion of this set whose elements are less than (or equal to, if inclusive is
true) toElement . |
public E | higher( Returns the least element in this set strictly greater than the given element, or null if there is no
such element. |
public E | lower( Returns the greatest element in this set strictly less than the given element, or null if there is no
such element. |
public E | Retrieves and removes the first (lowest) element, or returns null if this set is empty. |
public E | pollLast() Retrieves and removes the last (highest) element, or returns null if this set is empty. |
public NavigableSet< | subSet( Returns a view of the portion of this set whose elements range from fromElement to toElement . |
public NavigableSet< | tailSet( Returns a view of the portion of this set whose elements are greater than (or equal to, if inclusive is
true) fromElement . |
From: TransformingSortedSet< |
From: NavigableSet< |
From: TransformingSet< |
From: SortedSet< |
From: AbstractSet< |
From: Set< |
From: AbstractCollection< |
From: Collection< |
From: Object |
Overridden from: NavigableSet
Returns the least element in this set greater than or equal to the given element, or
null
if there is no
such element.ethe value to match
the least element greater than or equal to
e
, or null
if there is no such elementOverridden from: NavigableSet
Returns an iterator over the elements in this set, in descending order. Equivalent in effect to
descendingSet().iterator()
.an iterator over the elements in this set, in descending order
Overridden from: NavigableSet
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
remove
operation), the
results of the iteration are undefined.
The returned set has an ordering equivalent to
Collections.reverseOrder(comparator()). The expression
s.descendingSet().descendingSet()
returns a view of s
essentially equivalent to s
.
a reverse order view of this set
Overridden from: NavigableSet
Returns the greatest element in this set less than or equal to the given element, or
null
if there is no
such element.ethe value to match
the greatest element less than or equal to
e
, or null
if there is no such elementOverridden from: NavigableSet
Returns a view of the portion of this set whose elements are less than (or equal to, if
inclusive
is
true) toElement
. The returned set is backed by this set, so changes in the returned set are reflected in
this set, and vice-versa. The returned set supports all optional set operations that this set supports.
The returned set will throw an IllegalArgumentException
on an attempt to insert an element outside its
range.
toElementhigh endpoint of the returned set
inclusive
true
if the high endpoint is to be included in the returned viewa view of the portion of this set whose elements are less than (or equal to, if
inclusive
is
true) toElement
Overridden from: NavigableSet
Returns the least element in this set strictly greater than the given element, or
null
if there is no
such element.ethe value to match
the least element greater than
e
, or null
if there is no such elementOverridden from: NavigableSet
Returns the greatest element in this set strictly less than the given element, or
null
if there is no
such element.ethe value to match
the greatest element less than
e
, or null
if there is no such elementOverridden from: NavigableSet
Retrieves and removes the first (lowest) element, or returns
null
if this set is empty.the first element, or
null
if this set is emptyOverridden from: NavigableSet
Retrieves and removes the last (highest) element, or returns
null
if this set is empty.the last element, or
null
if this set is emptypublic NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
Overridden from: NavigableSet
Returns a view of the portion of this set whose elements range from
fromElement
to toElement
. If
fromElement
and toElement
are equal, the returned set is empty unless
fromInclusive
and toInclusive
are both true. The returned set is backed by this set, so changes in the
returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations
that this set supports.
The returned set will throw an IllegalArgumentException
on an attempt to insert an element outside its
range.
fromElementlow endpoint of the returned set
fromInclusive
true
if the low endpoint is to be included in the returned viewtoElementhigh endpoint of the returned set
toInclusive
true
if the high endpoint is to be included in the returned viewa view of the portion of this set whose elements range from
fromElement
, inclusive, to
toElement
, exclusiveOverridden from: NavigableSet
Returns a view of the portion of this set whose elements are greater than (or equal to, if
inclusive
is
true) fromElement
. The returned set is backed by this set, so changes in the returned set are reflected
in this set, and vice-versa. The returned set supports all optional set operations that this set supports.
The returned set will throw an IllegalArgumentException
on an attempt to insert an element outside its
range.
fromElementlow endpoint of the returned set
inclusive
true
if the low endpoint is to be included in the returned viewa view of the portion of this set whose elements are greater than or equal to
fromElement