public final class LinkedHashTreeMap<K,V> extends AbstractMap<K,V> implements Serializable
TreeMap, this class uses
insertion order for iteration order. Comparison order is only used as an
optimization for efficient insertion and removal.
This implementation was derived from Android 4.1's TreeMap and LinkedHashMap classes.
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| 构造器和说明 |
|---|
LinkedHashTreeMap()
Create a natural order, empty tree map whose keys must be mutually
comparable and non-null.
|
LinkedHashTreeMap(Comparator<? super K> comparator)
Create a tree map ordered by
comparator. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
Set<K> |
keySet() |
V |
put(K key,
V value) |
V |
remove(Object key) |
int |
size() |
clone, containsValue, equals, hashCode, isEmpty, putAll, toString, valuescompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic LinkedHashTreeMap()
public LinkedHashTreeMap(Comparator<? super K> comparator)
comparator. This map's keys may only
be null if comparator permits.comparator - the comparator to order elements with, or null to
use the natural ordering.public boolean containsKey(Object key)
containsKey 在接口中 Map<K,V>containsKey 在类中 AbstractMap<K,V>