Class SafeTreeMap<K,V>
- java.lang.Object
-
- com.google.common.collect.testing.SafeTreeMap<K,V>
-
- All Implemented Interfaces:
java.io.Serializable,java.util.Map<K,V>,java.util.NavigableMap<K,V>,java.util.SortedMap<K,V>
@GwtIncompatible public final class SafeTreeMap<K,V> extends java.lang.Object implements java.io.Serializable, java.util.NavigableMap<K,V>
A wrapper aroundTreeMapthat aggressively checks to see if keys are mutually comparable. This implementation passes the navigable map test suites.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SafeTreeMap()SafeTreeMap(java.util.Comparator<? super K> comparator)SafeTreeMap(java.util.Map<? extends K,? extends V> map)SafeTreeMap(java.util.SortedMap<K,? extends V> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map.Entry<K,V>ceilingEntry(K key)KceilingKey(K key)voidclear()java.util.Comparator<? super K>comparator()booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)java.util.NavigableSet<K>descendingKeySet()java.util.NavigableMap<K,V>descendingMap()java.util.Set<java.util.Map.Entry<K,V>>entrySet()booleanequals(java.lang.Object obj)java.util.Map.Entry<K,V>firstEntry()KfirstKey()java.util.Map.Entry<K,V>floorEntry(K key)KfloorKey(K key)Vget(java.lang.Object key)inthashCode()java.util.SortedMap<K,V>headMap(K toKey)java.util.NavigableMap<K,V>headMap(K toKey, boolean inclusive)java.util.Map.Entry<K,V>higherEntry(K key)KhigherKey(K key)booleanisEmpty()java.util.NavigableSet<K>keySet()java.util.Map.Entry<K,V>lastEntry()KlastKey()java.util.Map.Entry<K,V>lowerEntry(K key)KlowerKey(K key)java.util.NavigableSet<K>navigableKeySet()java.util.Map.Entry<K,V>pollFirstEntry()java.util.Map.Entry<K,V>pollLastEntry()Vput(K key, V value)voidputAll(java.util.Map<? extends K,? extends V> map)Vremove(java.lang.Object key)intsize()java.util.NavigableMap<K,V>subMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)java.util.SortedMap<K,V>subMap(K fromKey, K toKey)java.util.SortedMap<K,V>tailMap(K fromKey)java.util.NavigableMap<K,V>tailMap(K fromKey, boolean inclusive)java.lang.StringtoString()java.util.Collection<V>values()
-
-
-
Method Detail
-
comparator
public java.util.Comparator<? super K> comparator()
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
descendingKeySet
public java.util.NavigableSet<K> descendingKeySet()
-
keySet
public java.util.NavigableSet<K> keySet()
-
navigableKeySet
public java.util.NavigableSet<K> navigableKeySet()
-
subMap
public java.util.NavigableMap<K,V> subMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
-
values
public java.util.Collection<V> values()
-
equals
public boolean equals(java.lang.Object obj)
-
hashCode
public int hashCode()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-