java.util.Comparator ), and with various methods to obtain
specific mappings or ranges of mappings based on this ordering (such as the least key greater
than some instance of type K, or the sub-map with keys between two instances of type K).
Null values are supported. Null keys are disallowed unless the subclass specifically supports
them; attempts to add a null key will result in NullPointerException.
(Note: this is different from OrderedPMap, which keeps entries in the order that they
were added to the map.)
Every PSortedMap is a java. and more specifically a PMap, but as with
any sorted map, a PSortedMap will only obey the general contract of those interfaces if its
comparator is consistent with equals. (See java. for more information.)
Every PSortedMap is a java. and more specifically a java., but the implementations of PSortedMap provided by this library
(pcollections) depart from the specification of those interfaces in a few ways:
java.util.SortedMap , java.util.NavigableMap , java.util.Collections#unmodifiableSortedMap(java.util.SortedMap) , java.util.Collections#unmodifiableNavigableMap(java.util.NavigableMap) , org.pcollections.PMap , org.pcollections.PSortedSet , org.pcollections.TreePMap
| Modifier and Type | Method and Description |
|---|---|
| public Comparator | Returns: The comparator used to order the keys in this map. (Never null.)Redeclares java. Returns the comparator used to order the keys in this map, or
|
| public PSortedSet | descendingKeySet()
Redeclares java. Returns a reverse order |
| public PSortedMap | descendingMap()
Redeclares java. Returns a reverse order view of the mappings contained in this map. |
| public PSortedMap | headMap(K
high endpoint (exclusive) of the keys in the returned map toKey)Redeclares java. Returns a view of the portion of this map whose keys are
strictly less than |
| public PSortedMap | headMap(K
high endpoint of the keys in the returned map toKey, boolean true if the high endpoint
is to be included in the returned viewRedeclares java. Returns a view of the portion of this map whose keys are less than (or
equal to, if |
| public PSortedSet | keySet()
Redeclares java. Returns a |
| public PSortedMap | |
| public PSortedMap | |
| public PSortedMap | Returns: This map, minus its first mapping (the mapping with the least/lowest key).
|
| public PSortedMap | Returns: This map, minus its last mapping (the mapping with the greatest/highest key).
|
| public PSortedSet | navigableKeySet()
Redeclares java. Returns a |
| public PSortedMap | |
| public PSortedMap | |
| public default Map. | pollFirstEntry()
Implements java.
Deprecated
Unsupported operation.
Removes and returns a key-value mapping associated with
the least key in this map, or |
| public default Map. | pollLastEntry()
Implements java.
Deprecated
Unsupported operation.
Removes and returns a key-value mapping associated with
the greatest key in this map, or |
| public PSortedMap | subMap(K
low endpoint (inclusive) of the keys in the returned map fromKey, K high endpoint (exclusive) of the keys in the returned map toKey)Redeclares java. Returns a view of the portion of this map whose keys range from
|
| public PSortedMap | subMap(K
low endpoint of the keys in the returned map fromKey, boolean true if the low endpoint
is to be included in the returned viewhigh endpoint of the keys in the returned map toKey, boolean true if the high endpoint
is to be included in the returned viewRedeclares java. Returns a view of the portion of this map whose keys range from
|
| public PSortedMap | tailMap(K
low endpoint (inclusive) of the keys in the returned map fromKey)Redeclares java. Returns a view of the portion of this map whose keys are
greater than or equal to |
| public PSortedMap | tailMap(K
low endpoint of the keys in the returned map fromKey, boolean true if the low endpoint
is to be included in the returned viewRedeclares java. Returns a view of the portion of this map whose keys 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 keys in this map, or
| |
| descendingKeySet | back to summary |
|---|---|
| public PSortedSet Redeclares java. Doc from java. Returns a reverse order
| |
| descendingMap | back to summary |
|---|---|
| public PSortedMap Redeclares java. Doc from java. Returns a reverse order view of the mappings contained in this map.
The descending map is backed by this map, so changes to the map are
reflected in the descending map, and vice-versa. If either map is
modified while an iteration over a collection view of either map
is in progress (except through the iterator's own The returned map has an ordering equivalent to
| |
| headMap | back to summary |
|---|---|
| public PSortedMap Redeclares java. Doc from java. Returns a view of the portion of this map whose keys are
strictly less than The returned map will throw an Equivalent to
| |
| headMap | back to summary |
|---|---|
| public PSortedMap Redeclares java. Doc from java. Returns a view of the portion of this map whose keys are less than (or
equal to, if The returned map will throw an
| |
| keySet | back to summary |
|---|---|
| public PSortedSet Redeclares java. Doc from java. Returns a
| |
| minus | back to summary |
|---|---|
| public PSortedMap Redeclares org.
| |
| minusAll | back to summary |
|---|---|
| public PSortedMap Redeclares org.
| |
| minusFirstEntry | back to summary |
|---|---|
public PSortedMap
| |
| minusLastEntry | back to summary |
|---|---|
public PSortedMap
| |
| navigableKeySet | back to summary |
|---|---|
| public PSortedSet Redeclares java. Doc from java. Returns a
| |
| plus | back to summary |
|---|---|
| public PSortedMap Redeclares org.
| |
| plusAll | back to summary |
|---|---|
| public PSortedMap Redeclares org.
| |
| pollFirstEntry | back to summary |
|---|---|
| public default Map. Implements java. Doc from java. Deprecated Unsupported operation. Removes and returns a key-value mapping associated with
the least key in this map, or
| |
| pollLastEntry | back to summary |
|---|---|
| public default Map. Implements java. Doc from java. Deprecated Unsupported operation. Removes and returns a key-value mapping associated with
the greatest key in this map, or
| |
| subMap | back to summary |
|---|---|
| public PSortedMap Redeclares java. Doc from java. Returns a view of the portion of this map whose keys range from
The returned map will throw an Equivalent to
| |
| subMap | back to summary |
|---|---|
| public PSortedMap Redeclares java. Doc from java. Returns a view of the portion of this map whose keys range from
The returned map will throw an
| |
| tailMap | back to summary |
|---|---|
| public PSortedMap Redeclares java. Doc from java. Returns a view of the portion of this map whose keys are
greater than or equal to The returned map will throw an Equivalent to
| |
| tailMap | back to summary |
|---|---|
| public PSortedMap Redeclares java. Doc from java. Returns a view of the portion of this map whose keys are greater than (or
equal to, if The returned map will throw an
| |