Class CommonsHashMap<KEYTYPE,VALUETYPE>
java.lang.Object
java.util.AbstractMap<KEYTYPE,VALUETYPE>
java.util.HashMap<KEYTYPE,VALUETYPE>
com.helger.commons.collection.impl.CommonsHashMap<KEYTYPE,VALUETYPE>
- Type Parameters:
KEYTYPE- Map key typeVALUETYPE- Map value type
- All Implemented Interfaces:
ICommonsMap<KEYTYPE,,VALUETYPE> ICloneable<ICommonsMap<KEYTYPE,,VALUETYPE>> Serializable,Cloneable,Map<KEYTYPE,VALUETYPE>
public class CommonsHashMap<KEYTYPE,VALUETYPE>
extends HashMap<KEYTYPE,VALUETYPE>
implements ICommonsMap<KEYTYPE,VALUETYPE>
A special
HashMap implementation based on ICommonsMap.- Author:
- Philip Helger
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionCommonsHashMap(int nInitialCapacity) CommonsHashMap(int nInitialCapacity, float fLoadFactor) CommonsHashMap(COLLTYPE[] aValues, Function<? super COLLTYPE, ? extends KEYTYPE> aKeyMapper, Function<? super COLLTYPE, ? extends VALUETYPE> aValueMapper) CommonsHashMap(Collection<? extends COLLTYPE> aValues, Function<? super COLLTYPE, ? extends KEYTYPE> aKeyMapper, Function<? super COLLTYPE, ? extends VALUETYPE> aValueMapper) CommonsHashMap(Map<? extends KEYTYPE, ? extends VALUETYPE> aMap) CommonsHashMap(Map<? extends SRCKEYTYPE, ? extends SRCVALUETYPE> aValues, Function<? super SRCKEYTYPE, ? extends KEYTYPE> aKeyMapper, Function<? super SRCVALUETYPE, ? extends VALUETYPE> aValueMapper) -
Method Summary
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.commons.collection.impl.ICommonsMap
addAll, containsAnyEntry, containsAnyKey, containsAnyValue, copyOfEntrySet, copyOfKeySet, copyOfKeySet, copyOfValues, copyOfValues, copyOfValuesMapped, copyOfValuesMapped, findFirstEntry, findFirstKey, findFirstValue, forEach, forEachKey, forEachKey, forEachValue, forEachValue, getAsUnmodifiable, getFirstEntry, getFirstEntry, getFirstKey, getFirstKey, getFirstValue, getFirstValue, getSortedByKey, getSortedByValue, getSwappedKeyValues, isNotEmpty, put, putAll, putAll, putAllMapped, putAllMapped, putAllMapped, putIf, putIfNotNull, removeAll, removeIf, removeIfKey, removeIfValue, removeObject, setAllMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
CommonsHashMap
public CommonsHashMap() -
CommonsHashMap
-
CommonsHashMap
-
CommonsHashMap
-
CommonsHashMap
-
CommonsHashMap
-
CommonsHashMap
-
-
Method Details
-
createInstance
Description copied from interface:ICommonsMapCreate a new empty map. Overwrite this if you don't want to useCommonsHashMap.- Specified by:
createInstancein interfaceICommonsMap<KEYTYPE,VALUETYPE> - Type Parameters:
K- Map key typeV- Map value type- Returns:
- A new empty map. Never
null.
-
getClone
- Specified by:
getClonein interfaceICloneable<KEYTYPE>- Returns:
- A 100% deep-copy of the implementing class.
-