@Beta protected class ForwardingNavigableMap.StandardDescendingMap extends ForwardingMap<K,V>
A sensible implementation of 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.
|
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size, standardClear, standardContainsKey, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, sizepublic StandardDescendingMap()
Constructor for use by subclasses.
protected final Map<K,V> delegate()
ForwardingObjectReturns the backing delegate instance that methods are forwarded to. Abstract subclasses generally override this method with an abstract method that has a more specific return type, such as 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 Map.Entry<K,V> floorEntry(K key)
floorEntry 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 Map.Entry<K,V> firstEntry()
firstEntry 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 Collection<V> values()
public String toString()
ForwardingObjectReturns the string representation generated by the delegate’s toString method.
toString in class ForwardingObject