K
- 键类型V
- 值类型public abstract class CustomKeyMap<K,V> extends MapWrapper<K,V>
DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR
Constructor and Description |
---|
CustomKeyMap(Map<K,V> m)
构造
通过传入一个Map从而确定Map的类型,子类需创建一个空的Map,而非传入一个已有Map,否则值可能会被修改 |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(Object key) |
protected abstract Object |
customKey(Object key)
自定义键
|
V |
get(Object key) |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
remove(Object key) |
boolean |
remove(Object key,
Object value) |
V |
replace(K key,
V value) |
boolean |
replace(K key,
V oldValue,
V newValue) |
clear, compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, equals, forEach, getOrDefault, getRaw, hashCode, isEmpty, iterator, keySet, merge, putIfAbsent, replaceAll, size, toString, values
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
containsKey
in class MapWrapper<K,V>
Copyright © 2021. All rights reserved.