- All Implemented Interfaces:
- Map<K,,- V> - SequencedMap<K,,- V> - SortedMap<K,- V> 
- Direct Known Subclasses:
- ForwardingNavigableMap
Warning: The methods of ForwardingSortedMap forward indiscriminately to
 the methods of the delegate. For example, overriding ForwardingMap.put(K, V) alone will not change
 the behavior of ForwardingMap.putAll(java.util.Map<? extends K, ? extends V>), which can lead to unexpected behavior. In this case, you should
 override putAll as well, either providing your own implementation, or delegating to the
 provided standardPutAll method.
 
default method warning: This class does not forward calls to 
 default methods. Instead, it inherits their default implementations. When those implementations
 invoke methods, they invoke methods on the ForwardingSortedMap.
 
Each of the standard methods, where appropriate, use the comparator of the map to test
 equality for both keys and values, unlike ForwardingMap.
 
The standard methods and the collection views they return are not guaranteed to be
 thread-safe, even when all of the methods that they depend on are thread-safe.
- Since:
- 2.0
- Author:
- Mike Bostock, Louis Wasserman
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected classA sensible implementation ofSortedMap.keySet()in terms of the methods ofForwardingSortedMap.Nested classes/interfaces inherited from class com.google.common.collect.ForwardingMapForwardingMap.StandardEntrySet, ForwardingMap.StandardValues
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription@Nullable Comparator<? super K> delegate()Returns the backing delegate instance that methods are forwarded to.firstKey()lastKey()protected booleanA sensible definition ofForwardingMap.containsKey(java.lang.Object)in terms of thefirstKey()method oftailMap(K).standardSubMap(K fromKey, K toKey) A sensible default implementation ofsubMap(Object, Object)in terms ofheadMap(Object)andtailMap(Object).Methods inherited from class com.google.common.collect.ForwardingMapclear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, standardClear, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToString, valuesMethods inherited from class com.google.common.collect.ForwardingObjecttoStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Mapclear, 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.SequencedMapfirstEntry, lastEntry, pollFirstEntry, pollLastEntry, sequencedEntrySet, sequencedKeySet, sequencedValues
- 
Constructor Details- 
ForwardingSortedMapprotected ForwardingSortedMap()Constructor for use by subclasses.
 
- 
- 
Method Details- 
delegateDescription 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.
- 
comparator
- 
firstKey
- 
headMap
- 
lastKey
- 
subMap
- 
tailMap
- 
standardContainsKeyA sensible definition ofForwardingMap.containsKey(java.lang.Object)in terms of thefirstKey()method oftailMap(K). If you overridetailMap(K), you may wish to overrideForwardingMap.containsKey(java.lang.Object)to forward to this implementation.- Overrides:
- standardContainsKeyin class- ForwardingMap<K extends @Nullable Object, V extends @Nullable Object>
- Since:
- 7.0
 
- 
standardSubMapA sensible default implementation ofsubMap(Object, Object)in terms ofheadMap(Object)andtailMap(Object). In some situations, you may wish to overridesubMap(Object, Object)to forward to this implementation.- Since:
- 7.0
 
 
-