Package org.miaixz.bus.core.center.map
Class TolerantMap<K,V>
java.lang.Object
org.miaixz.bus.core.center.map.MapWrapper<K,V>
org.miaixz.bus.core.center.map.TolerantMap<K,V>
- Type Parameters:
K- 键类型V- 值类型
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Map.Entry<K,,V>> Map<K,,V> Wrapper<Map<K,V>>
一个可以提供默认值的Map
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTolerantMap(int initialCapacity, float loadFactor, V defaultValue) 构造TolerantMap(int initialCapacity, V defaultValue) 构造TolerantMap(Map<K, V> map, V defaultValue) 构造TolerantMap(V defaultValue) 构造 -
Method Summary
Methods inherited from class org.miaixz.bus.core.center.map.MapWrapper
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, getRaw, isEmpty, iterator, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TolerantMap
构造- Parameters:
defaultValue- 默认值
-
TolerantMap
构造- Parameters:
initialCapacity- 初始容量loadFactor- 增长因子defaultValue- 默认值
-
TolerantMap
构造- Parameters:
initialCapacity- 初始容量defaultValue- 默认值
-
TolerantMap
构造- Parameters:
map- Map实现defaultValue- 默认值
-
-
Method Details
-
of
构建TolerantMap- Type Parameters:
K- 键类型V- 值类型- Parameters:
map- map实现defaultValue- 默认值- Returns:
- TolerantMap
-
get
-
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toStringin classMapWrapper<K,V>
-