oracle.cabo.ui.collection
Class FlaggedAttributeMap
java.lang.Object
|
+--oracle.cabo.ui.collection.ArrayAttributeMap
|
+--oracle.cabo.ui.collection.FlaggedAttributeMap
- All Implemented Interfaces:
- AttributeMap
- public final class FlaggedAttributeMap
- extends ArrayAttributeMap
AttributeMap that stores a bitflag indicating the presence of an indexed AttributeKey in the AttributeMap. The use of the bitflags makes determining that no value for an indexed AttributeKey exists extremely fast. As gets for indexed AttributeKeys that do not exist in the AttributeMap make up the vast majority of gets on AttributeMaps used as storage for UINodes, using a FlaggedAttributeMap is a huge improvement over ArrayAttributeMap for performance. In fact, given the small size overhead of maintaining the flags, the FlaggedAttributeMap is the best general purpose AttributeMap to use for storing the attributes of UINodes.
- See Also:
IndexedAttributeMap
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FlaggedAttributeMap
public FlaggedAttributeMap()
FlaggedAttributeMap
public FlaggedAttributeMap(int size)
FlaggedAttributeMap
public FlaggedAttributeMap(int size,
int increment)
getAttribute
public java.lang.Object getAttribute(RenderingContext context,
AttributeKey key)
- Description copied from interface:
AttributeMap
- Returns the value in the AttributeMap specified by the key.
-
- Overrides:
getAttribute
in class ArrayAttributeMap
putAttribute
protected void putAttribute(AttributeKey key,
java.lang.Object value)
-
- Overrides:
putAttribute
in class ArrayAttributeMap
removeAttribute
protected void removeAttribute(AttributeKey key)
-
- Overrides:
removeAttribute
in class ArrayAttributeMap