Package com.luna.common.map
Class ChainHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
com.luna.common.map.ChainHashMap<K,V>
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<K,
V>
- Author:
- luna
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorDescriptionChainHashMap
(int initialCapacity) ChainHashMap
(int initialCapacity, float loadFactor) ChainHashMap
(Map<? extends K, ? extends V> m) -
Method Summary
Modifier and TypeMethodDescriptionstatic <K extends Comparable,
V>
ChainHashMap<K,V> 对 HashMap 的 put() 的方法进行封转返回 ChainHashMap 来实现 链式添加Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
ChainHashMap
public ChainHashMap(int initialCapacity) -
ChainHashMap
public ChainHashMap() -
ChainHashMap
-
ChainHashMap
public ChainHashMap(int initialCapacity, float loadFactor)
-
-
Method Details
-
newChainMap
-
putIfNull
对 HashMap 的 put() 的方法进行封转返回 ChainHashMap 来实现 链式添加- Parameters:
key
- kvalue
- v- Returns:
-