public class TreeMap<K,V> extends AbstractMap<K,V> implements NavigableMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
TreeMap() |
TreeMap(Comparator<? super K> comparator) |
TreeMap(Map<? extends K,? extends V> map) |
TreeMap(SortedMap<K,? extends V> map) |
equals, hashCode, isEmpty, toStringcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove, replace, replace, replaceAllpublic TreeMap()
public TreeMap(Comparator<? super K> comparator)
public void clear()
public Comparator<? super K> comparator()
comparator in interface SortedMap<K,V>public boolean containsKey(Object key)
containsKey in interface Map<K,V>containsKey in class AbstractMap<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>containsValue in class AbstractMap<K,V>public int size()
public Collection<V> values()
public Map.Entry<K,V> firstEntry()
firstEntry 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>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 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 Map.Entry<K,V> floorEntry(K key)
floorEntry in interface NavigableMap<K,V>public NavigableSet<K> navigableKeySet()
navigableKeySet in interface NavigableMap<K,V>public NavigableSet<K> descendingKeySet()
descendingKeySet in interface NavigableMap<K,V>public NavigableMap<K,V> descendingMap()
descendingMap in interface NavigableMap<K,V>public NavigableMap<K,V> subMap(K start, boolean startInclusive, K end, boolean endInclusive)
subMap in interface NavigableMap<K,V>public NavigableMap<K,V> headMap(K end, boolean inclusive)
headMap in interface NavigableMap<K,V>public NavigableMap<K,V> tailMap(K start, boolean inclusive)
tailMap in interface NavigableMap<K,V>Copyright © 2026. All rights reserved.