oracle.cabo.ui.collection
Class IndexedAttributeMap
java.lang.Object
|
+--oracle.cabo.ui.collection.ArrayAttributeMap
|
+--oracle.cabo.ui.collection.IndexedAttributeMap
- All Implemented Interfaces:
- AttributeMap
- public final class IndexedAttributeMap
- extends ArrayAttributeMap
ArrayAttributeMap that stores the values of indexed AttributeKeys in a separate array. Thus, the storage and retrieval of indexed AttributeKey values is as fast as possible, at the cost of a moderate minimum allocation cost. This implementation also speeds up the storage and retrieval of unindexed AttributeKeys since indexed AttributeKey/value pairs do not appear in unindexed AttributeKey/value pair array, thus speeding linear searching of that array.
In general FlaggedAttributeMap is a better compromise between performance and memory use for most UINodes, while the IndexedAttributeMap is best used as storage for UINodes receiving large numbers of gets, such as table stamps, or composite UINode implementations. The DictionaryAttributeMap is typically only a better choice when extremely large numbers of unindexed AttributeKeys are stored in a UINode.
- See Also:
FlaggedAttributeMap
, DictionaryAttributeMap
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IndexedAttributeMap
public IndexedAttributeMap()
IndexedAttributeMap
public IndexedAttributeMap(int size)
IndexedAttributeMap
public IndexedAttributeMap(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
setAttribute
public void setAttribute(AttributeKey key,
java.lang.Object value)
- Description copied from interface:
AttributeMap
- Sets an attribute value specified by the key to the new value.
-
- Overrides:
setAttribute
in class ArrayAttributeMap