Class AttributeContainerConcurrent<KEYTYPE,VALUETYPE>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.concurrent.ConcurrentHashMap<KEYTYPE,VALUETYPE>
-
- com.helger.commons.collection.impl.CommonsConcurrentHashMap<KEYTYPE,VALUETYPE>
-
- com.helger.commons.collection.attr.AttributeContainerConcurrent<KEYTYPE,VALUETYPE>
-
- Type Parameters:
KEYTYPE- Key typeVALUETYPE- Value type
- All Implemented Interfaces:
IAttributeContainer<KEYTYPE,VALUETYPE>,ICommonsMap<KEYTYPE,VALUETYPE>,ICloneable<ICommonsMap<KEYTYPE,VALUETYPE>>,IGetterByKeyTrait<KEYTYPE>,Serializable,ConcurrentMap<KEYTYPE,VALUETYPE>,Map<KEYTYPE,VALUETYPE>
- Direct Known Subclasses:
AttributeContainerAnyConcurrent
@ThreadSafe public class AttributeContainerConcurrent<KEYTYPE,VALUETYPE> extends CommonsConcurrentHashMap<KEYTYPE,VALUETYPE> implements IAttributeContainer<KEYTYPE,VALUETYPE>
Base class for all kind of any-any mapping container. This implementation is thread-safe!- 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>
-
Nested classes/interfaces inherited from interface com.helger.commons.collection.attr.IAttributeContainer
IAttributeContainer.IAfterSetValueCallback<KEYTYPE,VALUETYPE>, IAttributeContainer.IBeforeSetValueCallback<KEYTYPE,VALUETYPE>
-
-
Constructor Summary
Constructors Constructor Description AttributeContainerConcurrent()AttributeContainerConcurrent(Map<? extends KEYTYPE,? extends VALUETYPE> aMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CallbackList<IAttributeContainer.IAfterSetValueCallback<KEYTYPE,VALUETYPE>>afterSetValueCallbacks()CallbackList<IAttributeContainer.IBeforeSetValueCallback<KEYTYPE,VALUETYPE>>beforeSetValueCallbacks()booleancontainsKey(Object aKey)booleanequals(Object o)VALUETYPEget(Object aKey)AttributeContainerConcurrent<KEYTYPE,VALUETYPE>getClone()inthashCode()StringtoString()-
Methods inherited from class com.helger.commons.collection.impl.CommonsConcurrentHashMap
createInstance
-
Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, compute, computeIfAbsent, computeIfPresent, contains, containsValue, elements, entrySet, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, getOrDefault, 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, 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.attr.IAttributeContainer
getAsBoolean, getAsDouble, getAsFloat, getAsInt, getAsLong, getValue, putAllIn, putIn
-
Methods inherited from interface com.helger.commons.collection.impl.ICommonsMap
addAll, containsAnyEntry, containsAnyKey, containsAnyValue, copyOfEntrySet, copyOfKeySet, copyOfKeySet, copyOfValues, copyOfValues, copyOfValuesMapped, copyOfValuesMapped, createInstance, 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
-
Methods inherited from interface com.helger.commons.traits.IGetterByKeyTrait
containsNonNullValue, containsNullValue, getAsBigDecimal, getAsBigDecimal, getAsBigInteger, getAsBigInteger, getAsBoolean, getAsBooleanObj, getAsByte, getAsByte, getAsByteArray, getAsByteObj, getAsChar, getAsChar, getAsCharArray, getAsCharArray, getAsCharObj, getAsDouble, getAsDoubleObj, getAsFloat, getAsFloatObj, getAsInt, getAsIntObj, getAsLocalDate, getAsLocalDate, getAsLocalDate, getAsLocalDateTime, getAsLocalDateTime, getAsLocalDateTime, getAsLocalTime, getAsLocalTime, getAsLocalTime, getAsLong, getAsLongObj, getAsShort, getAsShort, getAsShortObj, getAsSqlBlob, getAsSqlClob, getAsSqlDate, getAsSqlNClob, getAsSqlRowId, getAsSqlTime, getAsSqlTimestamp, getAsString, getAsString, getAsStringList, getAsStringList, getAsStringSet, getAsStringSet, getCastedValue, getCastedValue, getCastedValue, getCastedValue, getConvertedValue, getConvertedValue, getSafeCastedValue, getSafeCastedValue, getValueClass, hasStringValue, hasStringValue, onSafeCastError
-
-
-
-
Method Detail
-
beforeSetValueCallbacks
@Nonnull @ReturnsMutableObject public final CallbackList<IAttributeContainer.IBeforeSetValueCallback<KEYTYPE,VALUETYPE>> beforeSetValueCallbacks()
- Specified by:
beforeSetValueCallbacksin interfaceIAttributeContainer<KEYTYPE,VALUETYPE>- Returns:
- Callbacks to be invoked before values are set. May not be
null.
-
afterSetValueCallbacks
@Nonnull @ReturnsMutableObject public final CallbackList<IAttributeContainer.IAfterSetValueCallback<KEYTYPE,VALUETYPE>> afterSetValueCallbacks()
- Specified by:
afterSetValueCallbacksin interfaceIAttributeContainer<KEYTYPE,VALUETYPE>- Returns:
- Callbacks to be invoked after values are set. May not be
null.
-
containsKey
public boolean containsKey(@Nullable Object aKey)
- Specified by:
containsKeyin interfaceMap<KEYTYPE,VALUETYPE>- Overrides:
containsKeyin classConcurrentHashMap<KEYTYPE,VALUETYPE>
-
getClone
@Nonnull @ReturnsMutableCopy public AttributeContainerConcurrent<KEYTYPE,VALUETYPE> getClone()
- Specified by:
getClonein interfaceIAttributeContainer<KEYTYPE,VALUETYPE>- Specified by:
getClonein interfaceICloneable<KEYTYPE>- Overrides:
getClonein classCommonsConcurrentHashMap<KEYTYPE,VALUETYPE>- Returns:
- A 100% deep-copy of the implementing class.
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
toString
public String toString()
- Overrides:
toStringin classConcurrentHashMap<KEYTYPE,VALUETYPE>
-
-