KEYTYPE - Key typeVALUETYPE - Value type@NotThreadSafe public class MapBasedGenericReadonlyAttributeContainer<KEYTYPE,VALUETYPE> extends AbstractGenericReadonlyAttributeContainer<KEYTYPE,VALUETYPE>
IGenericReadonlyAttributeContainer
based on a hash map. This implementation may carry null values
but that is not recommended.| Constructor and Description |
|---|
MapBasedGenericReadonlyAttributeContainer(IGenericReadonlyAttributeContainer<? extends KEYTYPE,? extends VALUETYPE> aCont) |
MapBasedGenericReadonlyAttributeContainer(KEYTYPE aKey,
VALUETYPE aValue) |
MapBasedGenericReadonlyAttributeContainer(Map<? extends KEYTYPE,? extends VALUETYPE> aMap) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsAttribute(KEYTYPE aName)
Check if an attribute of the given name is contained.
|
boolean |
containsNoAttribute() |
boolean |
equals(Object o) |
Set<KEYTYPE> |
getAllAttributeNames() |
Map<KEYTYPE,VALUETYPE> |
getAllAttributes() |
Collection<VALUETYPE> |
getAllAttributeValues() |
int |
getAttributeCount() |
Enumeration<KEYTYPE> |
getAttributeNames()
Get an enumerator over all contained attribute names.
|
VALUETYPE |
getAttributeObject(KEYTYPE aName)
Get the attribute value associated to the given attribute name.
|
int |
hashCode() |
String |
toString() |
getAsBigDecimal, getAsBigInteger, getAsBoolean, getAsDouble, getAsInt, getAsLong, getAsString, getAttributeAsBigDecimal, getAttributeAsBigDecimal, getAttributeAsBigInteger, getAttributeAsBigInteger, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsInt, getAttributeAsInt, getAttributeAsLong, getAttributeAsLong, getAttributeAsString, getAttributeAsString, getCastedAttribute, getCastedAttribute, getTypedAttribute, getTypedAttributepublic MapBasedGenericReadonlyAttributeContainer(@Nonnull KEYTYPE aKey, @Nullable VALUETYPE aValue)
public MapBasedGenericReadonlyAttributeContainer(@Nonnull Map<? extends KEYTYPE,? extends VALUETYPE> aMap)
public MapBasedGenericReadonlyAttributeContainer(@Nonnull IGenericReadonlyAttributeContainer<? extends KEYTYPE,? extends VALUETYPE> aCont)
public boolean containsAttribute(@Nullable KEYTYPE aName)
IGenericReadonlyAttributeContaineraName - name of the attribute to checktrue if the attribute is contained, false
otherwise@Nonnull @ReturnsMutableCopy public Map<KEYTYPE,VALUETYPE> getAllAttributes()
null map with all contained attributes.@Nonnull public Enumeration<KEYTYPE> getAttributeNames()
IGenericReadonlyAttributeContainer@Nonnull @ReturnsMutableCopy public Set<KEYTYPE> getAllAttributeNames()
@Nonnull @ReturnsMutableCopy public Collection<VALUETYPE> getAllAttributeValues()
@Nullable public VALUETYPE getAttributeObject(@Nullable KEYTYPE aName)
IGenericReadonlyAttributeContaineraName - the attribute namenull if no such value exists@Nonnegative public int getAttributeCount()
public boolean containsNoAttribute()
true if this attribute container does not contain any
attribute at all, false if at least one attribute is
contained.Copyright © 2014–2015 Philip Helger. All rights reserved.