Package com.google.common.collect
Class ForwardingNavigableMap.StandardDescendingMap
java.lang.Object
com.google.common.collect.ForwardingObject
com.google.common.collect.ForwardingMap<K,V>
com.google.common.collect.ForwardingNavigableMap.StandardDescendingMap
- All Implemented Interfaces:
Map<K,,V> NavigableMap<K,,V> SequencedMap<K,,V> SortedMap<K,V>
- Enclosing class:
ForwardingNavigableMap<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.
- Since:
- 12.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.collect.ForwardingMap
ForwardingMap.StandardEntrySet, ForwardingMap.StandardKeySet, ForwardingMap.StandardValues -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionceilingEntry(K key) ceilingKey(K key) Comparator<? super K> delegate()Returns the backing delegate instance that methods are forwarded to.entrySet()firstKey()floorEntry(K key) higherEntry(K key) keySet()lastKey()lowerEntry(K key) toString()Returns the string representation generated by the delegate'stoStringmethod.values()Methods inherited from class com.google.common.collect.ForwardingMap
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size, standardClear, standardContainsKey, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, sizeMethods inherited from interface java.util.NavigableMap
reversedMethods inherited from interface java.util.SequencedMap
sequencedEntrySet, sequencedKeySet, sequencedValues
-
Constructor Details
-
StandardDescendingMap
public StandardDescendingMap()Constructor for use by subclasses.
-
-
Method Details
-
entryIterator
-
delegate
Description copied from class: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 asForwardingSet.delegate(). Concrete subclasses override this method to supply the instance being decorated.- Specified by:
delegatein classForwardingMap<K,V>
-
comparator
- Specified by:
comparatorin interfaceSortedMap<K,V>
-
firstKey
-
lastKey
-
lowerEntry
- Specified by:
lowerEntryin interfaceNavigableMap<K,V>
-
lowerKey
- Specified by:
lowerKeyin interfaceNavigableMap<K,V>
-
floorEntry
- Specified by:
floorEntryin interfaceNavigableMap<K,V>
-
floorKey
- Specified by:
floorKeyin interfaceNavigableMap<K,V>
-
ceilingEntry
- Specified by:
ceilingEntryin interfaceNavigableMap<K,V>
-
ceilingKey
- Specified by:
ceilingKeyin interfaceNavigableMap<K,V>
-
higherEntry
- Specified by:
higherEntryin interfaceNavigableMap<K,V>
-
higherKey
- Specified by:
higherKeyin interfaceNavigableMap<K,V>
-
firstEntry
- Specified by:
firstEntryin interfaceNavigableMap<K,V> - Specified by:
firstEntryin interfaceSequencedMap<K,V>
-
lastEntry
- Specified by:
lastEntryin interfaceNavigableMap<K,V> - Specified by:
lastEntryin interfaceSequencedMap<K,V>
-
pollFirstEntry
- Specified by:
pollFirstEntryin interfaceNavigableMap<K,V> - Specified by:
pollFirstEntryin interfaceSequencedMap<K,V>
-
pollLastEntry
- Specified by:
pollLastEntryin interfaceNavigableMap<K,V> - Specified by:
pollLastEntryin interfaceSequencedMap<K,V>
-
descendingMap
- Specified by:
descendingMapin interfaceNavigableMap<K,V>
-
entrySet
-
keySet
-
descendingKeySet
- Specified by:
descendingKeySetin interfaceNavigableMap<K,V>
-
subMap
- Specified by:
subMapin interfaceNavigableMap<K,V>
-
headMap
- Specified by:
headMapin interfaceNavigableMap<K,V>
-
tailMap
- Specified by:
tailMapin interfaceNavigableMap<K,V>
-
subMap
- Specified by:
subMapin interfaceNavigableMap<K,V> - Specified by:
subMapin interfaceSortedMap<K,V>
-
headMap
- Specified by:
headMapin interfaceNavigableMap<K,V> - Specified by:
headMapin interfaceSortedMap<K,V>
-
tailMap
- Specified by:
tailMapin interfaceNavigableMap<K,V> - Specified by:
tailMapin interfaceSortedMap<K,V>
-
values
-
toString
Description copied from class:ForwardingObjectReturns the string representation generated by the delegate'stoStringmethod.- Overrides:
toStringin classForwardingObject
-