Package org.miaixz.bus.core.center.map
Class FunctionMap<K,V>
java.lang.Object
org.miaixz.bus.core.center.map.MapWrapper<K,V>
org.miaixz.bus.core.center.map.TransMap<K,V>
org.miaixz.bus.core.center.map.FunctionMap<K,V>
- Type Parameters:
K- 键类型V- 值类型
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Map.Entry<K,,V>> Map<K,,V> Wrapper<Map<K,,V>> Provider
自定义键值函数风格的Map
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.miaixz.bus.core.center.map.TransMap
compute, computeIfAbsent, computeIfPresent, containsKey, get, getOrDefault, merge, put, putAll, putIfAbsent, remove, remove, replace, replaceMethods inherited from class org.miaixz.bus.core.center.map.MapWrapper
clear, clone, containsValue, entrySet, equals, forEach, getRaw, hashCode, isEmpty, iterator, keySet, replaceAll, size, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
FunctionMap
public FunctionMap(Supplier<Map<K, V>> mapFactory, Function<Object, K> keyFunc, Function<Object, V> valueFunc) 构造 注意提供的Map中不能有键值对,否则可能导致自定义key失效- Parameters:
mapFactory- Map,提供的空mapkeyFunc- 自定义KEY的函数valueFunc- 自定义value函数
-
FunctionMap
构造 注意提供的Map中不能有键值对,否则可能导致自定义key失效- Parameters:
emptyMap- Map,提供的空mapkeyFunc- 自定义KEY的函数valueFunc- 自定义value函数
-
-
Method Details