| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | ReverseOrderSortedSetView.
Used for various subset views. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final SortedSet | |
| pack-priv final Comparator |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(E e)
Implements java. Adds the specified element to this set if it is not already present (optional operation). |
| public boolean | addAll(Collection<? extends E> c)
Implements java. Adds all of the elements in the specified collection to this set if they're not already present (optional operation). |
| public void | clear()
Implements java. Removes all of the elements from this set (optional operation). |
| public Comparator | comparator()
Implements java. Returns the comparator used to order the elements in this set,
or |
| public boolean | contains(Object o)
Implements java. Returns |
| public boolean | containsAll(Collection<?> c)
Implements java. Returns |
| pack-priv static <T> Iterator | |
| public boolean | equals(Object o)
Overrides java. Implements java. Compares the specified object with this set for equality. |
| public E | first()
Implements java. Returns the first (lowest) element currently in this set. |
| public void | forEach(Consumer<? super E> action)
Overrides default java. Performs the given action for each element of the |
| public int | hashCode()
Overrides java. Implements java. Returns the hash code value for this set. |
| public SortedSet | headSet(E to)
Implements java. Returns a view of the portion of this set whose elements are
strictly less than |
| public boolean | isEmpty()
Implements java. Returns |
| public Iterator | iterator()
Implements java. Returns an iterator over the elements in this set. |
| public E | last()
Implements java. Returns the last (highest) element currently in this set. |
| public static <T> SortedSet | |
| public Stream | parallelStream()
Overrides default java. Returns a possibly parallel |
| public boolean | remove(Object o)
Implements java. Removes the specified element from this set if it is present (optional operation). |
| public boolean | removeAll(Collection<?> c)
Implements java. Removes from this set all of its elements that are contained in the specified collection (optional operation). |
| public boolean | retainAll(Collection<?> c)
Implements java. Retains only the elements in this set that are contained in the specified collection (optional operation). |
| public int | size()
Implements java. Returns the number of elements in this set (its cardinality). |
| public Spliterator | spliterator()
Overrides default java. Creates a |
| public Stream | stream()
Overrides default java. Returns a sequential |
| public SortedSet | subSet(E from, E to)
Implements java. Returns a view of the portion of this set whose elements range
from |
| public SortedSet | tailSet(E from)
Implements java. Returns a view of the portion of this set whose elements are
greater than or equal to |
| public Object[] | toArray()
Implements java. Returns an array containing all of the elements in this set. |
| public <T> T[] | toArray(T[] a)
Implements java. Returns an array containing all of the elements in this set; the runtime type of the returned array is that of the specified array. |
| public <T> T[] | toArray(IntFunction<T[]> generator)
Overrides default java. Returns an array containing all of the elements in this collection,
using the provided |
| public String |
| base | back to summary |
|---|---|
| pack-priv final SortedSet<E> base | |
| comp | back to summary |
|---|---|
| pack-priv final Comparator<? super E> comp | |
| ReverseOrderSortedSetView | back to summary |
|---|---|
| private ReverseOrderSortedSetView(SortedSet<E> set) | |
| add | back to summary |
|---|---|
| public boolean add(E e) Implements java. Doc from java. Adds the specified element to this set if it is not already present
(optional operation). More formally, adds the specified element
The stipulation above does not imply that sets must accept all
elements; sets may refuse to add any particular element, including
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(Collection<? extends E> c) Implements java. Doc from java. Adds all of the elements in the specified collection to this set if
they're not already present (optional operation). If the specified
collection is also a set, the | |
| clear | back to summary |
|---|---|
| public void clear() Implements java. Doc from java. Removes all of the elements from this set (optional operation). The set will be empty after this call returns. | |
| comparator | back to summary |
|---|---|
| public Comparator Implements java. Doc from java. Returns the comparator used to order the elements in this set,
or | |
| contains | back to summary |
|---|---|
| public boolean contains(Object o) Implements java. Doc from java. Returns | |
| containsAll | back to summary |
|---|---|
| public boolean containsAll(Collection<?> c) Implements java. Doc from java. Returns | |
| descendingIterator | back to summary |
|---|---|
| pack-priv static <T> Iterator | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Implements java. Doc from java. Compares the specified object with this set for equality. Returns
| |
| first | back to summary |
|---|---|
| public E first() Implements java. Doc from java. Returns the first (lowest) element currently in this set. | |
| forEach | back to summary |
|---|---|
| public void forEach(Consumer<? super E> action) Overrides default java. Doc from java. Performs the given action for each element of the The behavior of this method is unspecified if the action performs side-effects that modify the underlying source of elements, unless an overriding class has specified a concurrent modification policy. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements java. Doc from java. Returns the hash code value for this set. The hash code of a set is
defined to be the sum of the hash codes of the elements in the set,
where the hash code of a | |
| headSet | back to summary |
|---|---|
| public SortedSet Implements java. Doc from java. Returns a view of the portion of this set whose elements are
strictly less than The returned set will throw an | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements java. Doc from java. Returns | |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns an iterator over the elements in this set. The elements are returned in no particular order (unless this set is an instance of some class that provides a guarantee). | |
| last | back to summary |
|---|---|
| public E last() Implements java. Doc from java. Returns the last (highest) element currently in this set. | |
| of | back to summary |
|---|---|
| public static <T> SortedSet Hides java. Doc from java. Returns an unmodifiable set containing one element. See Unmodifiable Sets for details. | |
| parallelStream | back to summary |
|---|---|
| public Stream Overrides default java. Doc from java. Returns a possibly parallel This method should be overridden when the | |
| remove | back to summary |
|---|---|
| public boolean remove(Object o) Implements java. Doc from java. Removes the specified element from this set if it is present
(optional operation). More formally, removes an element | |
| removeAll | back to summary |
|---|---|
| public boolean removeAll(Collection<?> c) Implements java. Doc from java. Removes from this set all of its elements that are contained in the specified collection (optional operation). If the specified collection is also a set, this operation effectively modifies this set so that its value is the asymmetric set difference of the two sets. | |
| retainAll | back to summary |
|---|---|
| public boolean retainAll(Collection<?> c) Implements java. Doc from java. Retains only the elements in this set that are contained in the specified collection (optional operation). In other words, removes from this set all of its elements that are not contained in the specified collection. If the specified collection is also a set, this operation effectively modifies this set so that its value is the intersection of the two sets. | |
| size | back to summary |
|---|---|
| public int size() Implements java. Doc from java. Returns the number of elements in this set (its cardinality). If this
set contains more than | |
| spliterator | back to summary |
|---|---|
| public Spliterator Overrides default java. Doc from java. Creates a The The spliterator's comparator (see
| |
| stream | back to summary |
|---|---|
| public Stream Overrides default java. Doc from java. Returns a sequential This method should be overridden when the | |
| subSet | back to summary |
|---|---|
| public SortedSet 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 SortedSet Implements java. Doc from java. Returns a view of the portion of this set whose elements are
greater than or equal to The returned set will throw an | |
| toArray | back to summary |
|---|---|
| public Object[] toArray() Implements java. Doc from java. Returns an array containing all of the elements in this set. If this set makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order. The returned array will be "safe" in that no references to it are maintained by this set. (In other words, this method must allocate a new array even if this set is backed by an array). The caller is thus free to modify the returned array. This method acts as bridge between array-based and collection-based APIs. | |
| toArray | back to summary |
|---|---|
| public <T> T[] toArray(T[] a) Implements java. Doc from java. Returns an array containing all of the elements in this set; the runtime type of the returned array is that of the specified array. If the set fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this set. If this set fits in the specified array with room to spare
(i.e., the array has more elements than this set), the element in
the array immediately following the end of the set is set to
If this set makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order. Like the Suppose
String[] y = x.toArray(new String[0]);
Note that toArray(new Object[0]) is identical in function to
toArray().
| |
| toArray | back to summary |
|---|---|
| public <T> T[] toArray(IntFunction<T[]> generator) Overrides default java. Doc from java. Returns an array containing all of the elements in this collection,
using the provided If this collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Comparator | |
| pack-priv final E | |
| pack-priv final E |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | |
| public boolean | add(E e)
Overrides java. Implements java. Adds the specified element to this set if it is not already present (optional operation). |
| pack-priv boolean | |
| public Comparator | comparator()
Implements java. Returns the comparator used to order the elements in this set,
or |
| public E | first()
Implements java. Returns the first (lowest) element currently in this set. |
| public SortedSet | headSet(E to)
Implements java. Returns a view of the portion of this set whose elements are
strictly less than |
| public Iterator | iterator()
Implements abstract java. Implements java. Returns an iterator over the elements in this set. |
| public E | last()
Implements java. Returns the last (highest) element currently in this set. |
| public boolean | remove(Object o)
Overrides java. Implements java. Removes the specified element from this set if it is present (optional operation). |
| public int | size()
Implements abstract java. Implements java. Returns the number of elements in this set (its cardinality). |
| public SortedSet | subSet(E from, E to)
Implements java. Returns a view of the portion of this set whose elements range
from |
| public SortedSet | tailSet(E from)
Implements java. Returns a view of the portion of this set whose elements are
greater than or equal to |
| cmp | back to summary |
|---|---|
| pack-priv final Comparator<E> cmp | |
| head | back to summary |
|---|---|
| pack-priv final E head | |
| tail | back to summary |
|---|---|
| pack-priv final E tail | |
| Subset | back to summary |
|---|---|
pack-priv Subset(E head, E tail)
| |
| aboveHead | back to summary |
|---|---|
| pack-priv boolean aboveHead(E e) | |
| add | back to summary |
|---|---|
| public boolean add(E e) Overrides java. Implements java. Doc from java. Adds the specified element to this set if it is not already present
(optional operation). More formally, adds the specified element
The stipulation above does not imply that sets must accept all
elements; sets may refuse to add any particular element, including
| |
| belowTail | back to summary |
|---|---|
| pack-priv boolean belowTail(E e) | |
| comparator | back to summary |
|---|---|
| public Comparator Implements java. Doc from java. Returns the comparator used to order the elements in this set,
or | |
| first | back to summary |
|---|---|
| public E first() Implements java. Doc from java. Returns the first (lowest) element currently in this set. | |
| headSet | back to summary |
|---|---|
| public SortedSet Implements java. Doc from java. Returns a view of the portion of this set whose elements are
strictly less than The returned set will throw an | |
| iterator | back to summary |
|---|---|
| public Iterator Implements abstract java. Implements java. Doc from java. Returns an iterator over the elements in this set. The elements are returned in no particular order (unless this set is an instance of some class that provides a guarantee). | |
| last | back to summary |
|---|---|
| public E last() Implements java. Doc from java. Returns the last (highest) element currently in this set. | |
| remove | back to summary |
|---|---|
| public boolean remove(Object o) Overrides java. Implements java. Doc from java. Removes the specified element from this set if it is present
(optional operation). More formally, removes an element | |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Doc from java. Returns the number of elements in this set (its cardinality). If this
set contains more than | |
| subSet | back to summary |
|---|---|
| public SortedSet 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 SortedSet Implements java. Doc from java. Returns a view of the portion of this set whose elements are
greater than or equal to The returned set will throw an | |