org.apache.myfaces.trinidadinternal.ui.collection
Class ArrayAttributeMap

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.ui.collection.ArrayAttributeMap
All Implemented Interfaces:
AttributeMap
Direct Known Subclasses:
FlaggedAttributeMap

public class ArrayAttributeMap
extends java.lang.Object
implements AttributeMap

AttributeMap implementation that stores AttributeKey value pairs in an array and locates the desired AttributeKey by making a linear scan.

Although extremely memory efficient and fast for the number of attributes stored on most UINodes ( < 15), FlaggedAttributeMap is a better general purpose AttributeMap implementation for use as UINode storage.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/ui/collection/ArrayAttributeMap.java#0 $) $Date: 10-nov-2005.18:56:56 $
Author:
The Oracle ADF Faces Team
See Also:
FlaggedAttributeMap, IndexedAttributeMap

Constructor Summary
ArrayAttributeMap()
           
ArrayAttributeMap(int size)
           
ArrayAttributeMap(int size, int increment)
           
 
Method Summary
 java.util.Iterator<AttributeKey> attributeKeys(UIXRenderingContext context)
          Returns an Iterator of all of the AttributeKeys in the AttributeMap that values exist for.
 java.lang.Object clone()
          Clones the map.
 java.lang.Object getAttribute(UIXRenderingContext context, AttributeKey key)
          Returns the value in the AttributeMap specified by the key.
protected  void putAttribute(AttributeKey key, java.lang.Object value)
           
protected  void removeAttribute(AttributeKey key)
           
 void setAttribute(AttributeKey key, java.lang.Object value)
          Sets an attribute value specified by the key to the new value.
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArrayAttributeMap

public ArrayAttributeMap()

ArrayAttributeMap

public ArrayAttributeMap(int size)

ArrayAttributeMap

public ArrayAttributeMap(int size,
                         int increment)
Method Detail

getAttribute

public java.lang.Object getAttribute(UIXRenderingContext context,
                                     AttributeKey key)
Description copied from interface: AttributeMap
Returns the value in the AttributeMap specified by the key.

Specified by:
getAttribute in interface AttributeMap

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.

Specified by:
setAttribute in interface AttributeMap

attributeKeys

public java.util.Iterator<AttributeKey> attributeKeys(UIXRenderingContext context)
Description copied from interface: AttributeMap
Returns an Iterator of all of the AttributeKeys in the AttributeMap that values exist for.

Specified by:
attributeKeys in interface AttributeMap

size

public int size()

clone

public java.lang.Object clone()
Clones the map.

Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

putAttribute

protected void putAttribute(AttributeKey key,
                            java.lang.Object value)

removeAttribute

protected void removeAttribute(AttributeKey key)


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.