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> SortedMap<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) ceilingKey(K key) voidclear()Comparator<? super K>booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanfirstKey()floorEntry(K key) inthashCode()higherEntry(K key) booleanisEmpty()keySet()lastKey()lowerEntry(K key) voidintsize()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, replaceAll
-
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
public void 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>
-
firstKey
-
floorEntry
- Specified by:
floorEntryin interfaceNavigableMap<K,V>
-
floorKey
- Specified by:
floorKeyin interfaceNavigableMap<K,V>
-
get
-
headMap
-
headMap
- Specified by:
headMapin interfaceNavigableMap<K,V>
-
higherEntry
- Specified by:
higherEntryin interfaceNavigableMap<K,V>
-
higherKey
- Specified by:
higherKeyin interfaceNavigableMap<K,V>
-
isEmpty
public boolean isEmpty() -
keySet
-
lastEntry
- Specified by:
lastEntryin interfaceNavigableMap<K,V>
-
lastKey
-
lowerEntry
- Specified by:
lowerEntryin interfaceNavigableMap<K,V>
-
lowerKey
- Specified by:
lowerKeyin interfaceNavigableMap<K,V>
-
pollFirstEntry
- Specified by:
pollFirstEntryin interfaceNavigableMap<K,V>
-
pollLastEntry
- Specified by:
pollLastEntryin interfaceNavigableMap<K,V>
-
put
-
putAll
-
remove
-
size
public int size() -
subMap
- Specified by:
subMapin interfaceNavigableMap<K,V>
-
subMap
-
tailMap
-
tailMap
- Specified by:
tailMapin interfaceNavigableMap<K,V>
-
values
-
equals
-
hashCode
public int hashCode() -
toString
-