Class SafeTreeMap<K,V>
java.lang.Object
com.google.common.collect.testing.SafeTreeMap<K,V>
- All Implemented Interfaces:
Serializable,Map<K,,V> NavigableMap<K,,V> SequencedMap<K,,V> SortedMap<K,V>
@GwtIncompatible
public final class SafeTreeMap<K,V>
extends Object
implements Serializable, NavigableMap<K,V>
A wrapper around
TreeMap that aggressively checks to see if keys are mutually comparable.
This implementation passes the navigable map test suites.- Author:
- Louis Wasserman
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSafeTreeMap(Comparator<? super K> comparator) SafeTreeMap(Map<? extends K, ? extends V> map) SafeTreeMap(SortedMap<K, ? extends V> map) -
Method Summary
Modifier and TypeMethodDescriptionceilingEntry(K key) @Nullable KceilingKey(K key) voidclear()Comparator<? super K> booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanfirstKey()floorEntry(K key) @Nullable K@Nullable VinthashCode()higherEntry(K key) @Nullable KbooleanisEmpty()keySet()lastKey()lowerEntry(K key) @Nullable K@Nullable Vvoid@Nullable Vintsize()toString()values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllMethods inherited from interface java.util.NavigableMap
reversedMethods inherited from interface java.util.SequencedMap
sequencedEntrySet, sequencedKeySet, sequencedValues
-
Constructor Details
-
SafeTreeMap
public SafeTreeMap() -
SafeTreeMap
-
SafeTreeMap
-
SafeTreeMap
-
-
Method Details
-
ceilingEntry
- Specified by:
ceilingEntryin interfaceNavigableMap<K,V>
-
ceilingKey
- Specified by:
ceilingKeyin interfaceNavigableMap<K,V>
-
clear
-
comparator
- Specified by:
comparatorin interfaceSortedMap<K,V>
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
descendingKeySet
- Specified by:
descendingKeySetin interfaceNavigableMap<K,V>
-
descendingMap
- Specified by:
descendingMapin interfaceNavigableMap<K,V>
-
entrySet
-
firstEntry
- Specified by:
firstEntryin interfaceNavigableMap<K,V> - Specified by:
firstEntryin interfaceSequencedMap<K,V>
-
firstKey
-
floorEntry
- Specified by:
floorEntryin interfaceNavigableMap<K,V>
-
floorKey
-
get
-
headMap
-
headMap
- Specified by:
headMapin interfaceNavigableMap<K,V>
-
higherEntry
- Specified by:
higherEntryin interfaceNavigableMap<K,V>
-
higherKey
-
isEmpty
-
keySet
-
lastEntry
-
lastKey
-
lowerEntry
- Specified by:
lowerEntryin interfaceNavigableMap<K,V>
-
lowerKey
-
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>
-
put
-
putAll
-
remove
-
size
-
subMap
- Specified by:
subMapin interfaceNavigableMap<K,V>
-
subMap
-
tailMap
-
tailMap
- Specified by:
tailMapin interfaceNavigableMap<K,V>
-
values
-
equals
-
hashCode
-
toString
-