Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

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

Constructor Summary
IndexedAttributeMap()
           
IndexedAttributeMap(int size)
           
IndexedAttributeMap(int size, int increment)
           
 
Method Summary
 java.lang.Object getAttribute(RenderingContext context, AttributeKey key)
          Returns the value in the AttributeMap specified by the key.
 void setAttribute(AttributeKey key, java.lang.Object value)
          Sets an attribute value specified by the key to the new value.
 
Methods inherited from class oracle.cabo.ui.collection.ArrayAttributeMap
attributeKeys, clone, putAttribute, removeAttribute, size, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexedAttributeMap

public IndexedAttributeMap()

IndexedAttributeMap

public IndexedAttributeMap(int size)

IndexedAttributeMap

public IndexedAttributeMap(int size,
                           int increment)
Method Detail

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

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.