com.dynamide.util
Class CompositeArray

java.lang.Object
  extended by com.dynamide.util.CompositeAbstract
      extended by com.dynamide.util.CompositeArray
All Implemented Interfaces:
IComposite

public class CompositeArray
extends CompositeAbstract
implements IComposite


Nested Class Summary
 class CompositeArray.Entry
           
 
Nested classes/interfaces inherited from class com.dynamide.util.CompositeAbstract
CompositeAbstract.DumpWalker
 
Field Summary
 
Fields inherited from class com.dynamide.util.CompositeAbstract
ATTRIBUTE_NOT_FOUND, ATTRIBUTES_CHANGED, CHILDREN_CHANGED, NAME_CHANGED
 
Constructor Summary
CompositeArray(java.lang.String name, IComposite parent)
           
 
Method Summary
 void addAttribute(java.lang.String attribute_name, java.lang.Object attribute_value)
           
 IComposite addChild(IComposite new_child)
          Normally, you wouldn't call addChild from user classes.
 java.lang.Object attributeByName(java.lang.String attributeName)
           
 IComposite findComposite(java.lang.String itemName)
           
 java.util.Collection getAttributes()
           
 java.util.Map getAttributesMap()
           
 IComposite getChild(java.lang.String name)
           
 int getChildCount()
           
 java.util.Collection getChildren()
           
 java.lang.String printAttributes()
           
 IComposite removeChild(IComposite old_child)
           
 
Methods inherited from class com.dynamide.util.CompositeAbstract
addChangeListener, detach, dump, dump, dumpHTML, dumpPath, finalize, get, getDepth, getName, getParent, getRoot, notifyChangeListeners, removeChangeListener, setName, setParent, toString, walk, walkPostOrder, walkPreOrder
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.dynamide.util.IComposite
dump, dumpHTML, dumpPath, get, getDepth, getName, getParent, getRoot, setParent, walk
 

Constructor Detail

CompositeArray

public CompositeArray(java.lang.String name,
                      IComposite parent)
Method Detail

addChild

public IComposite addChild(IComposite new_child)
                    throws java.lang.Exception
Normally, you wouldn't call addChild from user classes. Just call the constructor (String name, Composite parent). This sets the parent and adds the child to the tree.

Specified by:
addChild in interface IComposite
Specified by:
addChild in class CompositeAbstract
Throws:
java.lang.Exception

getChildren

public java.util.Collection getChildren()
Specified by:
getChildren in interface IComposite
Specified by:
getChildren in class CompositeAbstract
Returns:
An Enumeration of all direct children of this Composite.

getChildCount

public int getChildCount()
Specified by:
getChildCount in class CompositeAbstract

removeChild

public IComposite removeChild(IComposite old_child)
Specified by:
removeChild in interface IComposite
Specified by:
removeChild in class CompositeAbstract

getChild

public IComposite getChild(java.lang.String name)

findComposite

public IComposite findComposite(java.lang.String itemName)
                         throws java.lang.Exception
Specified by:
findComposite in interface IComposite
Specified by:
findComposite in class CompositeAbstract
Throws:
java.lang.Exception

addAttribute

public void addAttribute(java.lang.String attribute_name,
                         java.lang.Object attribute_value)
Specified by:
addAttribute in interface IComposite
Specified by:
addAttribute in class CompositeAbstract

attributeByName

public java.lang.Object attributeByName(java.lang.String attributeName)
Specified by:
attributeByName in class CompositeAbstract
Returns:
The attribute with the requested name, or null if not found.

getAttributesMap

public java.util.Map getAttributesMap()
Specified by:
getAttributesMap in class CompositeAbstract

getAttributes

public java.util.Collection getAttributes()
Specified by:
getAttributes in interface IComposite
Specified by:
getAttributes in class CompositeAbstract

printAttributes

public java.lang.String printAttributes()
Specified by:
printAttributes in interface IComposite
Overrides:
printAttributes in class CompositeAbstract


Copyright © 2001-2013 DYNAMIDE.COM. All Rights Reserved.