E
- the type of elements maintained by this set
Serializable
, Cloneable
, Iterable<E>
, Collection<E>
, NavigableSet<E>
, SequencedCollection<E>
, SequencedSet<E>
, Set<E>
, SortedSet<E>
Constructors
Constructs a new, empty tree set, sorted according to the natural ordering of its elements.
Constructs a new tree set containing the elements in the specified collection, sorted according to the natural ordering of its elements.
Constructs a new, empty tree set, sorted according to the specified comparator.
Constructs a new tree set containing the same elements and using the same ordering as the specified sorted set.
boolean
Adds the specified element to this set if it is not already present.
boolean
Adds all of the elements in the specified collection to this set.
void
Throws UnsupportedOperationException
.
void
Throws UnsupportedOperationException
.
Returns the least element in this set greater than or equal to the given element, or null
if there is no such element.
void
Removes all of the elements from this set.
Returns a shallow copy of this TreeSet
instance.
Returns the comparator used to order the elements in this set, or
null
if this set uses the
natural orderingof its elements.
boolean
Returns true
if this set contains the specified element.
Returns an iterator over the elements in this set in descending order.
Returns a reverse order view of the elements contained in this set.
Returns the first (lowest) element currently in this set.
Returns the greatest element in this set less than or equal to the given element, or null
if there is no such element.
Returns a view of the portion of this set whose elements are strictly less than toElement
.
Returns a view of the portion of this set whose elements are less than (or equal to, if inclusive
is true) toElement
.
Returns the least element in this set strictly greater than the given element, or null
if there is no such element.
boolean
Returns true
if this set contains no elements.
Returns an iterator over the elements in this set in ascending order.
Returns the last (highest) element currently in this set.
Returns the greatest element in this set strictly less than the given element, or null
if there is no such element.
Retrieves and removes the first (lowest) element, or returns null
if this set is empty (optional operation).
Retrieves and removes the last (highest) element, or returns null
if this set is empty (optional operation).
boolean
Removes the specified element from this set if it is present.
int
Returns the number of elements in this set (its cardinality).
subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
Returns a view of the portion of this set whose elements range from fromElement
to toElement
.
Returns a view of the portion of this set whose elements range from fromElement
, inclusive, to toElement
, exclusive.
Returns a view of the portion of this set whose elements are greater than or equal to fromElement
.
tailSet(E fromElement, boolean inclusive)
Returns a view of the portion of this set whose elements are greater than (or equal to, if inclusive
is true) fromElement
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4