@NotThreadSafe public final class MapBasedReadonlyAttributeContainer extends AbstractReadonlyAttributeContainer
IReadonlyAttributeContainer based on a
hash map. This implementation may carry null values but that is
not recommended.| Constructor and Description |
|---|
MapBasedReadonlyAttributeContainer(IReadonlyAttributeContainer aCont) |
MapBasedReadonlyAttributeContainer(Map<String,?> aMap) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsAttribute(String sName)
Check if an attribute of the given name is contained.
|
boolean |
containsNoAttribute() |
boolean |
equals(Object o) |
Set<String> |
getAllAttributeNames() |
Map<String,Object> |
getAllAttributes() |
Collection<Object> |
getAllAttributeValues() |
int |
getAttributeCount() |
Enumeration<String> |
getAttributeNames()
Get an enumerator over all contained attribute names.
|
Object |
getAttributeObject(String sName)
Get the attribute value associated to the given attribute name.
|
int |
hashCode() |
String |
toString() |
getAsBoolean, getAsDouble, getAsInt, getAsLong, getAsString, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsInt, getAttributeAsInt, getAttributeAsLong, getAttributeAsLong, getAttributeAsString, getAttributeAsString, getCastedAttribute, getCastedAttribute, getTypedAttribute, getTypedAttributepublic MapBasedReadonlyAttributeContainer(@Nonnull Map<String,?> aMap)
public MapBasedReadonlyAttributeContainer(@Nonnull IReadonlyAttributeContainer aCont)
public boolean containsAttribute(@Nullable String sName)
IReadonlyAttributeContainersName - name of the attribute to checktrue if the attribute is contained, false
otherwise@Nonnull @ReturnsMutableCopy public Map<String,Object> getAllAttributes()
null map with all contained attributes.@Nonnull public Enumeration<String> getAttributeNames()
IReadonlyAttributeContainer@Nonnull @ReturnsMutableCopy public Set<String> getAllAttributeNames()
@Nonnull @ReturnsMutableCopy public Collection<Object> getAllAttributeValues()
@Nullable public Object getAttributeObject(@Nullable String sName)
IReadonlyAttributeContainersName - 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 © 2006–2014 phloc systems. All rights reserved.