Class CommonsConcurrentHashMap<KEYTYPE,VALUETYPE>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.concurrent.ConcurrentHashMap<KEYTYPE,VALUETYPE>
-
- com.helger.commons.collection.impl.CommonsConcurrentHashMap<KEYTYPE,VALUETYPE>
-
- Type Parameters:
KEYTYPE- Map key typeVALUETYPE- Map value type
- All Implemented Interfaces:
ICommonsMap<KEYTYPE,VALUETYPE>,ICloneable<ICommonsMap<KEYTYPE,VALUETYPE>>,Serializable,ConcurrentMap<KEYTYPE,VALUETYPE>,Map<KEYTYPE,VALUETYPE>
- Direct Known Subclasses:
AttributeContainerConcurrent
public class CommonsConcurrentHashMap<KEYTYPE,VALUETYPE> extends ConcurrentHashMap<KEYTYPE,VALUETYPE> implements ICommonsMap<KEYTYPE,VALUETYPE>
A specialConcurrentHashMapimplementation based onICommonsMap.- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap
ConcurrentHashMap.KeySetView<K extends Object,V extends Object>
-
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
Constructors Constructor Description CommonsConcurrentHashMap()CommonsConcurrentHashMap(int nInitialCapacity)CommonsConcurrentHashMap(int nInitialCapacity, float fLoadFactor)CommonsConcurrentHashMap(Collection<? extends COLLTYPE> aValues, Function<? super COLLTYPE,? extends KEYTYPE> aKeyMapper, Function<? super COLLTYPE,? extends VALUETYPE> aValueMapper)CommonsConcurrentHashMap(Map<? extends KEYTYPE,? extends VALUETYPE> aMap)CommonsConcurrentHashMap(Map<? extends SRCKEYTYPE,? extends SRCVALUETYPE> aValues, Function<? super SRCKEYTYPE,? extends KEYTYPE> aKeyMapper, Function<? super SRCVALUETYPE,? extends VALUETYPE> aValueMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K,V>
CommonsConcurrentHashMap<K,V>createInstance()Create a new empty map.CommonsConcurrentHashMap<KEYTYPE,VALUETYPE>getClone()-
Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values
-
Methods inherited from class java.util.AbstractMap
clone
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods 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, setAll
-
-
-
-
Constructor Detail
-
CommonsConcurrentHashMap
public CommonsConcurrentHashMap()
-
CommonsConcurrentHashMap
public CommonsConcurrentHashMap(int nInitialCapacity)
-
CommonsConcurrentHashMap
public CommonsConcurrentHashMap(int nInitialCapacity, @Nonnegative float fLoadFactor)
-
CommonsConcurrentHashMap
public CommonsConcurrentHashMap(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE> aMap)
-
CommonsConcurrentHashMap
public CommonsConcurrentHashMap(@Nullable Collection<? extends COLLTYPE> aValues, @Nonnull Function<? super COLLTYPE,? extends KEYTYPE> aKeyMapper, @Nonnull Function<? super COLLTYPE,? extends VALUETYPE> aValueMapper)
-
-
Method Detail
-
createInstance
@Nonnull @ReturnsMutableCopy public <K,V> CommonsConcurrentHashMap<K,V> 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
@Nonnull @ReturnsMutableCopy public CommonsConcurrentHashMap<KEYTYPE,VALUETYPE> getClone()
- Specified by:
getClonein interfaceICloneable<KEYTYPE>- Returns:
- A 100% deep-copy of the implementing class.
-
-