Package de.intarsys.tools.attribute
Class AttributeMap
java.lang.Object
de.intarsys.tools.attribute.AttributeMap
- All Implemented Interfaces:
IAttributeSupport
A default implementation for
IAttributeSupport. The API is "doubled"
to be usable as a simple replacement for a Map.
The keys are looked up using object identity!
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()getAttribute(Object key) Get an attribute value from the contextObject[]getKeys()The keys used in this attribute lookup map.removeAttribute(Object key) Remove an attribute binding in the contextsetAttribute(Object key, Object value) Set the value of an attribute in the context
-
Constructor Details
-
AttributeMap
public AttributeMap() -
AttributeMap
public AttributeMap(int initialCapacity)
-
-
Method Details
-
clear
public void clear() -
get
-
getAttribute
Description copied from interface:IAttributeSupportGet an attribute value from the context- Specified by:
getAttributein interfaceIAttributeSupport- Parameters:
key- the name of the attribute to get- Returns:
- The value of the attribute
key
-
getKeys
The keys used in this attribute lookup map.!! This is not intended to be published to client code, as this would compromise IAttributeSupport security !!
- Returns:
- The keys used in this attribute lookup map.
-
put
-
remove
-
removeAttribute
Description copied from interface:IAttributeSupportRemove an attribute binding in the context- Specified by:
removeAttributein interfaceIAttributeSupport- Parameters:
key- the name of the attribute to remove- Returns:
- The previously associated value for
key
-
setAttribute
Description copied from interface:IAttributeSupportSet the value of an attribute in the context- Specified by:
setAttributein interfaceIAttributeSupport- Parameters:
key- the name of the attribute to setvalue- the new value the attribute- Returns:
- The previously associated value for
key
-