Interface IAttributeContainerAny<KEYTYPE>
- Type Parameters:
KEYTYPE- Key type
- All Superinterfaces:
IAttributeContainer<KEYTYPE,,Object> ICloneable<ICommonsMap<KEYTYPE,,Object>> ICommonsMap<KEYTYPE,,Object> IGetterByKeyTrait<KEYTYPE>,Map<KEYTYPE,Object>
- All Known Implementing Classes:
AttributeContainerAny,AttributeContainerAnyConcurrent
This is the writable extension of the
<String,
Object>. null values are not allowed in this attribute
containers.- Author:
- Philip Helger
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.helger.commons.collection.attr.IAttributeContainer
IAttributeContainer.IAfterSetValueCallback<KEYTYPE,VALUETYPE>, IAttributeContainer.IBeforeSetValueCallback<KEYTYPE, VALUETYPE> -
Method Summary
Modifier and TypeMethodDescriptiondefault booleangetAndSetFlag(KEYTYPE aName) Atomic operation to set a flag totrueif it was previously set tofalse(meaning not existing).getClone()default EChangeSet/overwrite an attribute value.default EChangeSet/overwrite an attribute value.default EChangeSet/overwrite an attribute value.default EChangeSet/overwrite an attribute value.default EChangeSet/overwrite an attribute value.default EChangeSet/overwrite an attribute value.Methods inherited from interface com.helger.commons.collection.attr.IAttributeContainer
afterSetValueCallbacks, beforeSetValueCallbacks, getAsBoolean, getAsDouble, getAsFloat, getAsInt, getAsLong, getValue, putAllIn, putInMethods 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, setAllMethods 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, onSafeCastErrorMethods 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
-
Method Details
-
putIn
Set/overwrite an attribute value. This is a shortcut forputIn (aName, Boolean.valueOf (bValue));- Parameters:
aName- The name of the attribute. May not benull.bValue- The value of the attribute.- Returns:
EChange.CHANGEDif something changed,EChange.UNCHANGEDotherwise.
-
putIn
Set/overwrite an attribute value. This is a shortcut forputIn (aName, Integer.valueOf (nValue));- Parameters:
aName- The name of the attribute. May not benull.nValue- The value of the attribute.- Returns:
EChange.CHANGEDif something changed,EChange.UNCHANGEDotherwise.
-
putIn
Set/overwrite an attribute value. This is a shortcut forputIn (aName, Long.valueOf (nValue));- Parameters:
aName- The name of the attribute. May not benull.nValue- The value of the attribute.- Returns:
EChange.CHANGEDif something changed,EChange.UNCHANGEDotherwise.
-
putIn
Set/overwrite an attribute value. This is a shortcut forputIn (aName, Short.valueOf (nValue));- Parameters:
aName- The name of the attribute. May not benull.nValue- The value of the attribute.- Returns:
EChange.CHANGEDif something changed,EChange.UNCHANGEDotherwise.
-
putIn
Set/overwrite an attribute value. This is a shortcut forputIn (aName, Float.valueOf (fValue));- Parameters:
aName- The name of the attribute. May not benull.fValue- The value of the attribute.- Returns:
EChange.CHANGEDif something changed,EChange.UNCHANGEDotherwise.
-
putIn
Set/overwrite an attribute value. This is a shortcut forputIn (aName, Double.valueOf (dValue));- Parameters:
aName- The name of the attribute. May not benull.dValue- The value of the attribute.- Returns:
EChange.CHANGEDif something changed,EChange.UNCHANGEDotherwise.
-
getAndSetFlag
Atomic operation to set a flag totrueif it was previously set tofalse(meaning not existing). There is no possibility to define a value for this flag. The value used isBoolean.TRUE.Map.containsKey(Object)can be used to check if the attribute is already present.- Parameters:
aName- The name of the flag to set.- Returns:
- The old value of the flag. If the flag was not present previously,
than
falseis returned, whereas if the flag was already present,trueis returned. Any other than the first call for the same flag is always returningtrue.
-
getClone
- Specified by:
getClonein interfaceIAttributeContainer<KEYTYPE,Object> - Specified by:
getClonein interfaceICloneable<KEYTYPE>- Returns:
- A 100% deep-copy of the implementing class.
-