K
- 键类型V
- 值类型public class FuncMap<K,V> extends TransMap<K,V>
DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR
Constructor and Description |
---|
FuncMap(Map<K,V> emptyMap,
Function<Object,K> keyFunc,
Function<Object,V> valueFunc)
构造
注意提供的Map中不能有键值对,否则可能导致自定义key失效 |
FuncMap(Supplier<Map<K,V>> mapFactory,
Function<Object,K> keyFunc,
Function<Object,V> valueFunc)
构造
注意提供的Map中不能有键值对,否则可能导致自定义key失效 |
Modifier and Type | Method and Description |
---|---|
protected K |
customKey(Object key)
根据函数自定义键
|
protected V |
customValue(Object value)
自定义值
|
compute, computeIfAbsent, computeIfPresent, containsKey, get, getOrDefault, merge, put, putAll, putIfAbsent, remove, remove, replace, replace
clear, clone, containsValue, entrySet, equals, forEach, getRaw, hashCode, isEmpty, iterator, keySet, replaceAll, size, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public FuncMap(Supplier<Map<K,V>> mapFactory, Function<Object,K> keyFunc, Function<Object,V> valueFunc)
mapFactory
- Map,提供的空mapkeyFunc
- 自定义KEY的函数valueFunc
- 自定义value函数Copyright © 2024. All rights reserved.