@Beta protected class ForwardingNavigableMap.StandardDescendingMap extends ForwardingMap<K,V>
NavigableMap.descendingMap()
in terms of the methods of
this NavigableMap
. In many cases, you may wish to override
ForwardingNavigableMap.descendingMap()
to forward to this implementation or a subclass
thereof.
In particular, this map iterates over entries with repeated calls to
NavigableMap.lowerEntry(K)
. If a more efficient means of iteration is available, you may
wish to override the entryIterator()
method of this class.
ForwardingMap.StandardEntrySet, ForwardingMap.StandardKeySet, ForwardingMap.StandardValues
Constructor and Description |
---|
StandardDescendingMap()
Constructor for use by subclasses.
|
Modifier and Type | Method and Description |
---|---|
Map.Entry<K,V> |
ceilingEntry(K key) |
K |
ceilingKey(K key) |
Comparator<? super K> |
comparator() |
protected Map<K,V> |
delegate()
Returns the backing delegate instance that methods are forwarded to.
|
NavigableSet<K> |
descendingKeySet() |
NavigableMap<K,V> |
descendingMap() |
protected Iterator<Map.Entry<K,V>> |
entryIterator() |
Set<Map.Entry<K,V>> |
entrySet() |
Map.Entry<K,V> |
firstEntry() |
K |
firstKey() |
Map.Entry<K,V> |
floorEntry(K key) |
K |
floorKey(K key) |
SortedMap<K,V> |
headMap(K toKey) |
NavigableMap<K,V> |
headMap(K toKey,
boolean inclusive) |
Map.Entry<K,V> |
higherEntry(K key) |
K |
higherKey(K key) |
Set<K> |
keySet() |
Map.Entry<K,V> |
lastEntry() |
K |
lastKey() |
Map.Entry<K,V> |
lowerEntry(K key) |
K |
lowerKey(K key) |
NavigableSet<K> |
navigableKeySet() |
Map.Entry<K,V> |
pollFirstEntry() |
Map.Entry<K,V> |
pollLastEntry() |
void |
replaceAll(BiFunction<? super K,? super V,? extends V> function) |
NavigableMap<K,V> |
subMap(K fromKey,
boolean fromInclusive,
K toKey,
boolean toInclusive) |
SortedMap<K,V> |
subMap(K fromKey,
K toKey) |
SortedMap<K,V> |
tailMap(K fromKey) |
NavigableMap<K,V> |
tailMap(K fromKey,
boolean inclusive) |
String |
toString()
Returns the string representation generated by the delegate's
toString method. |
Collection<V> |
values() |
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size, standardClear, standardContainsKey, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
public StandardDescendingMap()
public void replaceAll(BiFunction<? super K,? super V,? extends V> function)
protected Iterator<Map.Entry<K,V>> entryIterator()
protected final Map<K,V> delegate()
ForwardingObject
ForwardingSet.delegate()
. Concrete subclasses override this method to supply
the instance being decorated.delegate
in class ForwardingMap<K,V>
public Comparator<? super K> comparator()
comparator
in interface SortedMap<K,V>
public Map.Entry<K,V> lowerEntry(K key)
lowerEntry
in interface NavigableMap<K,V>
public K lowerKey(K key)
lowerKey
in interface NavigableMap<K,V>
public Map.Entry<K,V> floorEntry(K key)
floorEntry
in interface NavigableMap<K,V>
public K floorKey(K key)
floorKey
in interface NavigableMap<K,V>
public Map.Entry<K,V> ceilingEntry(K key)
ceilingEntry
in interface NavigableMap<K,V>
public K ceilingKey(K key)
ceilingKey
in interface NavigableMap<K,V>
public Map.Entry<K,V> higherEntry(K key)
higherEntry
in interface NavigableMap<K,V>
public K higherKey(K key)
higherKey
in interface NavigableMap<K,V>
public Map.Entry<K,V> firstEntry()
firstEntry
in interface NavigableMap<K,V>
public Map.Entry<K,V> lastEntry()
lastEntry
in interface NavigableMap<K,V>
public Map.Entry<K,V> pollFirstEntry()
pollFirstEntry
in interface NavigableMap<K,V>
public Map.Entry<K,V> pollLastEntry()
pollLastEntry
in interface NavigableMap<K,V>
public NavigableMap<K,V> descendingMap()
descendingMap
in interface NavigableMap<K,V>
public NavigableSet<K> navigableKeySet()
navigableKeySet
in interface NavigableMap<K,V>
public NavigableSet<K> descendingKeySet()
descendingKeySet
in interface NavigableMap<K,V>
public NavigableMap<K,V> subMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
subMap
in interface NavigableMap<K,V>
public NavigableMap<K,V> headMap(K toKey, boolean inclusive)
headMap
in interface NavigableMap<K,V>
public NavigableMap<K,V> tailMap(K fromKey, boolean inclusive)
tailMap
in interface NavigableMap<K,V>
public SortedMap<K,V> subMap(K fromKey, K toKey)
subMap
in interface NavigableMap<K,V>
subMap
in interface SortedMap<K,V>
public SortedMap<K,V> headMap(K toKey)
headMap
in interface NavigableMap<K,V>
headMap
in interface SortedMap<K,V>
public SortedMap<K,V> tailMap(K fromKey)
tailMap
in interface NavigableMap<K,V>
tailMap
in interface SortedMap<K,V>
public Collection<V> values()
public String toString()
ForwardingObject
toString
method.toString
in class ForwardingObject
Copyright © 2010-2017. All Rights Reserved.