java.util.Comparator ), and with various methods to obtain specific
elements or ranges of elements based on this ordering (such as the least element greater than
some value, or the set of elements between two values).
(Note: this is different from OrderedPSet, which keeps elements in the order that they
were added to the set.)
Null values are disallowed unless the subclass specifically supports them; attempts to add a
null value will result in NullPointerException.
Every PSortedSet is a java. and more specifically a PSet, but as with
any sorted set, a PSortedSet will only obey the general contract of those interfaces if its
comparator is consistent with equals. (See java. for more information.)
Every PSortedSet is a java. and more specifically a java., but the implementations of PSortedSet provided by this library
(pcollections) depart from the specification of those interfaces in a few ways:
java.util.SortedSet , java.util.NavigableSet , java.util.Collections#unmodifiableSortedSet(java.util.SortedSet) , java.util.Collections#unmodifiableNavigableSet(java.util.NavigableSet) , org.pcollections.PSet , org.pcollections.PSortedMap , org.pcollections.TreePSet
| Modifier and Type | Method and Description |
|---|---|
| public Comparator | Returns: The comparator used to order the elements in this set. May be null if this set uses the natural ordering of its elements, though in that case the implementations provided by this library (pcollections) return a Comparator instance that implements the natural ordering.Redeclares java. Returns the comparator used to order the elements in this set,
or |
| public PSortedSet | descendingSet()
Redeclares java. Returns a reverse order view of the elements contained in this set. |
| public PSortedSet | headSet(E
high endpoint (exclusive) of the returned set toElement)Redeclares java. Returns a view of the portion of this set whose elements are
strictly less than |
| public PSortedSet | headSet(E
high endpoint of the returned set toElement, boolean true if the high endpoint
is to be included in the returned viewRedeclares java. Returns a view of the portion of this set whose elements are less than
(or equal to, if |
| public default PSortedSet | |
| public PSortedSet | Returns: This set, except with e removed (if e is an element of this set).Redeclares org.
|
| public PSortedSet | Returns: This set, except with the elements of list removed (if they are elements of this set).Redeclares org.
|
| public PSortedSet | |
| public PSortedSet | |
| public PSortedSet | Returns: This set, except with e added (unless e is already an element of this set).Redeclares org.
|
| public PSortedSet | Returns: This set, except with the elements of list added (unless they are already elements of this set).Redeclares org.
|
| public default E | pollFirst()
Implements java.
Deprecated
Unsupported operation.
Retrieves and removes the first (lowest) element,
or returns |
| public default E | pollLast()
Implements java.
Deprecated
Unsupported operation.
Retrieves and removes the last (highest) element,
or returns |
| public PSortedSet | subSet(E
low endpoint (inclusive) of the returned set fromElement, E high endpoint (exclusive) of the returned set toElement)Redeclares java. Returns a view of the portion of this set whose elements range
from |
| public PSortedSet | subSet(E
low endpoint of the returned set fromElement, boolean true if the low endpoint
is to be included in the returned viewhigh endpoint of the returned set toElement, boolean true if the high endpoint
is to be included in the returned viewRedeclares java. Returns a view of the portion of this set whose elements range from
|
| public PSortedSet | tailSet(E
low endpoint (inclusive) of the returned set fromElement)Redeclares java. Returns a view of the portion of this set whose elements are
greater than or equal to |
| public PSortedSet | tailSet(E
low endpoint of the returned set fromElement, boolean true if the low endpoint
is to be included in the returned viewRedeclares java. Returns a view of the portion of this set whose elements are greater
than (or equal to, if |
| comparator | back to summary |
|---|---|
| public Comparator Redeclares java. Doc from java. Returns the comparator used to order the elements in this set,
or
| |
| descendingSet | back to summary |
|---|---|
| public PSortedSet Redeclares 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
| |
| headSet | back to summary |
|---|---|
| public PSortedSet Redeclares 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 Equivalent to
| |
| headSet | back to summary |
|---|---|
| public PSortedSet Redeclares 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
| |
| intersect | back to summary |
|---|---|
| public default PSortedSet Overrides default org.
| |
| minus | back to summary |
|---|---|
| public PSortedSet Redeclares org.
| |
| minusAll | back to summary |
|---|---|
| public PSortedSet Redeclares org.
| |
| minusFirst | back to summary |
|---|---|
public PSortedSet
| |
| minusLast | back to summary |
|---|---|
public PSortedSet
| |
| plus | back to summary |
|---|---|
| public PSortedSet Redeclares org.
| |
| plusAll | back to summary |
|---|---|
| public PSortedSet Redeclares org.
| |
| pollFirst | back to summary |
|---|---|
| public default E pollFirst() Implements java. Doc from java. Deprecated Unsupported operation. Retrieves and removes the first (lowest) element,
or returns
| |
| pollLast | back to summary |
|---|---|
| public default E pollLast() Implements java. Doc from java. Deprecated Unsupported operation. Retrieves and removes the last (highest) element,
or returns
| |
| subSet | back to summary |
|---|---|
| public PSortedSet Redeclares java. Doc from java. Returns a view of the portion of this set whose elements range
from The returned set will throw an Equivalent to
| |
| subSet | back to summary |
|---|---|
| public PSortedSet Redeclares 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 PSortedSet Redeclares 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 Equivalent to
| |
| tailSet | back to summary |
|---|---|
| public PSortedSet Redeclares 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
| |