K
- key typeV
- value typepublic class TreeMap<K,V> extends AbstractMap<K,V> implements Serializable
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
TreeMap() |
TreeMap(Comparator<? super K> c) |
TreeMap(Map<? extends K,? extends V> map) |
TreeMap(SortedMap<K,? extends V> map) |
containsValue, equals, hashCode, isEmpty, putAll, toString, values
compute, computeIfAbsent, computeIfPresent, containsValue, forEach, getOrDefault, isEmpty, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, values
public TreeMap()
public TreeMap(Comparator<? super K> c)
public void clear()
public Comparator<? super K> comparator()
comparator
in interface SortedMap<K,V>
public NavigableMap<K,V> headMap(K toKey, boolean inclusive)
headMap
in interface NavigableMap<K,V>
public int size()
public NavigableMap<K,V> subMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
subMap
in interface NavigableMap<K,V>
public NavigableMap<K,V> tailMap(K fromKey, boolean inclusive)
tailMap
in interface NavigableMap<K,V>
public Map.Entry<K,V> ceilingEntry(K key)
ceilingEntry
in interface NavigableMap<K,V>
public K ceilingKey(K key)
ceilingKey
in interface NavigableMap<K,V>
public boolean containsKey(Object k)
containsKey
in interface Map<K,V>
containsKey
in class AbstractMap<K,V>
public NavigableSet<K> descendingKeySet()
descendingKeySet
in interface NavigableMap<K,V>
public NavigableMap<K,V> descendingMap()
descendingMap
in interface NavigableMap<K,V>
public Map.Entry<K,V> firstEntry()
firstEntry
in interface NavigableMap<K,V>
public Map.Entry<K,V> floorEntry(K key)
floorEntry
in interface NavigableMap<K,V>
public Map.Entry<K,V> higherEntry(K key)
higherEntry
in interface NavigableMap<K,V>
public Map.Entry<K,V> lowerEntry(K key)
lowerEntry
in interface NavigableMap<K,V>
public NavigableSet<K> navigableKeySet()
navigableKeySet
in interface NavigableMap<K,V>
public Map.Entry<K,V> pollFirstEntry()
pollFirstEntry
in interface NavigableMap<K,V>
public Map.Entry<K,V> pollLastEntry()
pollLastEntry
in interface NavigableMap<K,V>
Copyright © 2018. All rights reserved.