de.intarsys.tools.attribute
public final class AttributeMap extends java.lang.Object implements IAttributeSupport
IAttributeSupport
. The API is "doubled"
to be usable as a simple replacement for a Map
.
The keys are looked up using object identity!
Constructor and Description |
---|
AttributeMap() |
AttributeMap(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
java.lang.Object |
get(java.lang.Object key) |
java.lang.Object |
getAttribute(java.lang.Object key)
Get an attribute value from the context
|
java.lang.Object[] |
getKeys()
The keys used in this attribute lookup map.
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object o) |
java.lang.Object |
remove(java.lang.Object key) |
java.lang.Object |
removeAttribute(java.lang.Object key)
Remove an attribute binding in the context
|
java.lang.Object |
setAttribute(java.lang.Object key,
java.lang.Object value)
Set the value of an attribute in the context
|
public AttributeMap()
public AttributeMap(int initialCapacity)
public void clear()
public java.lang.Object get(java.lang.Object key)
public java.lang.Object getAttribute(java.lang.Object key)
IAttributeSupport
getAttribute
in interface IAttributeSupport
key
- the name of the attribute to getkey
public java.lang.Object[] getKeys()
!! This is not intended to be published to client code, as this would compromise IAttributeSupport security !!
public java.lang.Object put(java.lang.Object key, java.lang.Object o)
public java.lang.Object remove(java.lang.Object key)
public java.lang.Object removeAttribute(java.lang.Object key)
IAttributeSupport
removeAttribute
in interface IAttributeSupport
key
- the name of the attribute to removekey
public java.lang.Object setAttribute(java.lang.Object key, java.lang.Object value)
IAttributeSupport
setAttribute
in interface IAttributeSupport
key
- the name of the attribute to setvalue
- the new value the attributekey