Todo
copy in equals and hashCode from AbstractMap
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | ReverseOrderSortedMapView.
Used for various submap views. |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final SortedMap | |
| pack-priv final Comparator |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Overrides java. Implements java. Removes all of the mappings from this map (optional operation). |
| public Comparator | comparator()
Implements java. Returns the comparator used to order the keys in this map, or
|
| public boolean | containsKey(Object key)
Overrides java. Implements java. Returns |
| public boolean | containsValue(Object value)
Overrides java. Implements java. Returns |
| pack-priv static <K, V> Iterator | |
| pack-priv static <K, V> Iterator | |
| pack-priv static <K, V> Iterator | |
| public Set | entrySet()
Implements abstract java. Implements java. Returns a |
| public Map. | firstEntry()
Overrides default java. Returns the first key-value mapping in this map,
or |
| public K | firstKey()
Implements java. Returns the first (lowest) key currently in this map. |
| public V | get(Object key)
Overrides java. Implements java. Returns the value to which the specified key is mapped,
or |
| public SortedMap | headMap(K toKey)
Implements java. Returns a view of the portion of this map whose keys are
strictly less than |
| public boolean | isEmpty()
Overrides java. Implements java. Returns |
| public Set | keySet()
Overrides java. Implements java. Returns a |
| public Map. | lastEntry()
Overrides default java. Returns the last key-value mapping in this map,
or |
| public K | lastKey()
Implements java. Returns the last (highest) key currently in this map. |
| public static <K, V> SortedMap | |
| public Map. | pollFirstEntry()
Overrides default java. Removes and returns the first key-value mapping in this map,
or |
| public Map. | pollLastEntry()
Overrides default java. Removes and returns the last key-value mapping in this map,
or |
| public V | put(K key, V value)
Overrides java. Implements java. Associates the specified value with the specified key in this map (optional operation). |
| public void | putAll(Map<? extends K, ? extends V> m)
Overrides java. Implements java. Copies all of the mappings from the specified map to this map (optional operation). |
| public V | putFirst(K k, V v)
Overrides default java. Throws |
| public V | putLast(K k, V v)
Overrides default java. Throws |
| public V | remove(Object key)
Overrides java. Implements java. Removes the mapping for a key from this map if it is present (optional operation). |
| public SortedMap | reversed()
Overrides default java. Returns a reverse-ordered view of this map. |
| public int | size()
Overrides java. Implements java. Returns the number of key-value mappings in this map. |
| public SortedMap | subMap(K fromKey, K toKey)
Implements java. Returns a view of the portion of this map whose keys range from
|
| public SortedMap | tailMap(K fromKey)
Implements java. Returns a view of the portion of this map whose keys are
greater than or equal to |
| public String | |
| pack-priv static <K, V> String | |
| public Collection | values()
Overrides java. Implements java. Returns a |
| base | back to summary |
|---|---|
| pack-priv final SortedMap<K, V> base | |
| cmp | back to summary |
|---|---|
| pack-priv final Comparator<? super K> cmp | |
| ReverseOrderSortedMapView | back to summary |
|---|---|
| private ReverseOrderSortedMapView(SortedMap<K, V> map) | |
| clear | back to summary |
|---|---|
| public void clear() Overrides java. Implements java. Doc from java. Removes all of the mappings from this map (optional operation). The map 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 keys in this map, or
| |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(Object key) Overrides java. Implements java. Doc from java. Returns | |
| containsValue | back to summary |
|---|---|
| public boolean containsValue(Object value) Overrides java. Implements java. Doc from java. Returns | |
| descendingEntryIterator | back to summary |
|---|---|
| pack-priv static <K, V> Iterator | |
| descendingKeyIterator | back to summary |
|---|---|
| pack-priv static <K, V> Iterator | |
| descendingValueIterator | back to summary |
|---|---|
| pack-priv static <K, V> Iterator | |
| entrySet | back to summary |
|---|---|
| public Set Implements abstract java. Implements java. Doc from java. Returns a | |
| firstEntry | back to summary |
|---|---|
| public Map. Overrides default java. Doc from java. Returns the first key-value mapping in this map,
or | |
| firstKey | back to summary |
|---|---|
| public K firstKey() Implements java. Doc from java. Returns the first (lowest) key currently in this map. | |
| get | back to summary |
|---|---|
| public V get(Object key) Overrides java. Implements java. Doc from java. Returns the value to which the specified key is mapped,
or More formally, if this map contains a mapping from a key
If this map permits null values, then a return value of
| |
| headMap | back to summary |
|---|---|
| public SortedMap Implements 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 | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Overrides java. Implements java. Doc from java. Returns | |
| keySet | back to summary |
|---|---|
| public Set Overrides java. Implements java. Doc from java. Returns a | |
| lastEntry | back to summary |
|---|---|
| public Map. Overrides default java. Doc from java. Returns the last key-value mapping in this map,
or | |
| lastKey | back to summary |
|---|---|
| public K lastKey() Implements java. Doc from java. Returns the last (highest) key currently in this map. | |
| of | back to summary |
|---|---|
| public static <K, V> SortedMap | |
| pollFirstEntry | back to summary |
|---|---|
| public Map. Overrides default java. Doc from java. Removes and returns the first key-value mapping in this map,
or | |
| pollLastEntry | back to summary |
|---|---|
| public Map. Overrides default java. Doc from java. Removes and returns the last key-value mapping in this map,
or | |
| put | back to summary |
|---|---|
| public V put(K key, V value) Overrides java. Implements java. Doc from java. Associates the specified value with the specified key in this map
(optional operation). If the map previously contained a mapping for
the key, the old value is replaced by the specified value. (A map
| |
| putAll | back to summary |
|---|---|
| public void putAll(Map<? extends K, ? extends V> m) Overrides java. Implements java. Doc from java. Copies all of the mappings from the specified map to this map
(optional operation). The effect of this call is equivalent to that
of calling | |
| putFirst | back to summary |
|---|---|
| public V putFirst(K k, V v) Overrides default java. Doc from java. Throws | |
| putLast | back to summary |
|---|---|
| public V putLast(K k, V v) Overrides default java. Doc from java. Throws | |
| remove | back to summary |
|---|---|
| public V remove(Object key) Overrides java. Implements java. Doc from java. Removes the mapping for a key from this map if it is present
(optional operation). More formally, if this map contains a mapping
from key Returns the value to which this map previously associated the key,
or If this map permits null values, then a return value of
The map will not contain a mapping for the specified key once the call returns. | |
| reversed | back to summary |
|---|---|
| public SortedMap Overrides default java. Doc from java. Returns a reverse-ordered view of this map. The encounter order of mappings in the returned view is the inverse of the encounter order of mappings in this map. The reverse ordering affects all order-sensitive operations, including those on the view collections of the returned view. If the implementation permits modifications to this view, the modifications "write through" to the underlying map. Changes to the underlying map might or might not be visible in this reversed view, depending upon the implementation. | |
| size | back to summary |
|---|---|
| public int size() Overrides java. Implements java. Doc from java. Returns the number of key-value mappings in this map. If the
map contains more than | |
| subMap | back to summary |
|---|---|
| public SortedMap Implements 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 SortedMap Implements 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 | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of this map. The string representation
consists of a list of key-value mappings in the order returned by the
map's | |
| toString | back to summary |
|---|---|
| pack-priv static <K, V> String toString(Map<K, V> thisMap, Iterator<Map. | |
| values | back to summary |
|---|---|
| public Collection Overrides java. Implements java. Doc from java. Returns a | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final K | |
| pack-priv final K |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | |
| pack-priv boolean | |
| public Comparator | comparator()
Implements java. Returns the comparator used to order the keys in this map, or
|
| pack-priv Iterator | |
| public Set | entrySet()
Implements abstract java. Implements java. Returns a |
| public K | firstKey()
Implements java. Returns the first (lowest) key currently in this map. |
| public SortedMap | headMap(K to)
Implements java. Returns a view of the portion of this map whose keys are
strictly less than |
| public K | lastKey()
Implements java. Returns the last (highest) key currently in this map. |
| public V | put(K key, V value)
Overrides java. Implements java. Associates the specified value with the specified key in this map (optional operation). |
| public V | remove(Object o)
Overrides java. Implements java. Removes the mapping for a key from this map if it is present (optional operation). |
| public int | size()
Overrides java. Implements java. Returns the number of key-value mappings in this map. |
| public SortedMap | subMap(K from, K to)
Implements java. Returns a view of the portion of this map whose keys range from
|
| public SortedMap | tailMap(K from)
Implements java. Returns a view of the portion of this map whose keys are
greater than or equal to |
| public String |
| Submap | back to summary |
|---|---|
| pack-priv Submap(K head, K tail) | |
| aboveHead | back to summary |
|---|---|
| pack-priv boolean aboveHead(K k) | |
| belowTail | back to summary |
|---|---|
| pack-priv boolean belowTail(K k) | |
| comparator | back to summary |
|---|---|
| public Comparator Implements java. Doc from java. Returns the comparator used to order the keys in this map, or
| |
| entryIterator | back to summary |
|---|---|
| pack-priv Iterator | |
| entrySet | back to summary |
|---|---|
| public Set Implements abstract java. Implements java. Doc from java. Returns a | |
| firstKey | back to summary |
|---|---|
| public K firstKey() Implements java. Doc from java. Returns the first (lowest) key currently in this map. | |
| headMap | back to summary |
|---|---|
| public SortedMap Implements 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 | |
| lastKey | back to summary |
|---|---|
| public K lastKey() Implements java. Doc from java. Returns the last (highest) key currently in this map. | |
| put | back to summary |
|---|---|
| public V put(K key, V value) Overrides java. Implements java. Doc from java. Associates the specified value with the specified key in this map
(optional operation). If the map previously contained a mapping for
the key, the old value is replaced by the specified value. (A map
| |
| remove | back to summary |
|---|---|
| public V remove(Object o) Overrides java. Implements java. Doc from java. Removes the mapping for a key from this map if it is present
(optional operation). More formally, if this map contains a mapping
from key Returns the value to which this map previously associated the key,
or If this map permits null values, then a return value of
The map will not contain a mapping for the specified key once the call returns. | |
| size | back to summary |
|---|---|
| public int size() Overrides java. Implements java. Doc from java. Returns the number of key-value mappings in this map. If the
map contains more than | |
| subMap | back to summary |
|---|---|
| public SortedMap Implements 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 SortedMap Implements 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 | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of this map. The string representation
consists of a list of key-value mappings in the order returned by the
map's | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final K | |
| pack-priv final Map | |
| pack-priv final V |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object o)
Overrides java. Implements java. Compares the specified object with this entry for equality. |
| public K | |
| public V | |
| public int | hashCode()
Overrides java. Implements java. Returns the hash code value for this map entry. |
| public V | setValue(V newValue)
Implements java. Replaces the value corresponding to this entry with the specified value (optional operation). |
| public String |
| key | back to summary |
|---|---|
| pack-priv final K key | |
| map | back to summary |
|---|---|
| pack-priv final Map<K, V> map | |
| value | back to summary |
|---|---|
| pack-priv final V value | |
| ViewEntry | back to summary |
|---|---|
| pack-priv ViewEntry(Map<K, V> map, K key, V value) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Implements java. Doc from java. Compares the specified object with this entry for equality.
Returns
(e1.getKey()==null ?
e2.getKey()==null : e1.getKey().equals(e2.getKey())) &&
(e1.getValue()==null ?
e2.getValue()==null : e1.getValue().equals(e2.getValue()))
This ensures that the equals method works properly across
different implementations of the Map.Entry interface.
| |
| getKey | back to summary |
|---|---|
| public K getKey() Implements java. Doc from java. Returns the key corresponding to this entry. | |
| getValue | back to summary |
|---|---|
| public V getValue() Implements java. Doc from java. Returns the value corresponding to this entry. If the mapping
has been removed from the backing map (by the iterator's
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements java. Doc from java. Returns the hash code value for this map entry. The hash code
of a map entry
(e.getKey()==null ? 0 : e.getKey().hashCode()) ^
(e.getValue()==null ? 0 : e.getValue().hashCode())
This ensures that e1.equals(e2) implies that
e1.hashCode()==e2.hashCode() for any two Entries
e1 and e2, as required by the general
contract of Object.hashCode.
| |
| setValue | back to summary |
|---|---|
| public V setValue(V newValue) Implements java. Doc from java. Replaces the value corresponding to this entry with the specified
value (optional operation). (Writes through to the map.) The
behavior of this call is undefined if the mapping has already been
removed from the map (by the iterator's | |
| 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- | |