biz.hammurapi.util
Class TreeNode

java.lang.Object
  extended by biz.hammurapi.util.VisitableBase
      extended by biz.hammurapi.util.TreeNode
All Implemented Interfaces:
Attributable, Searchable, Visitable

public class TreeNode
extends VisitableBase
implements Attributable

Simple class to build tree structures

Version:
$Revision: 1.4 $
Author:
Pavel Vlasov

Constructor Summary
TreeNode()
           
 
Method Summary
protected  void acceptChildren(Visitor visitor)
          Override this method to navigate visitor through object constituents.
 void addChild(java.lang.Object child)
           
 java.lang.Object getAttribute(java.lang.Object key)
           
 java.util.List getChildren()
           
 TreeNode getParent()
           
 boolean hasAttribute(java.lang.String name)
           
 java.lang.Object removeAttribute(java.lang.Object key)
           
 void setAttribute(java.lang.Object key, java.lang.Object value)
           
 
Methods inherited from class biz.hammurapi.util.VisitableBase
accept, convert2searchable, find, findAll, object2visitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeNode

public TreeNode()
Method Detail

acceptChildren

protected void acceptChildren(Visitor visitor)
Description copied from class: VisitableBase
Override this method to navigate visitor through object constituents.

Overrides:
acceptChildren in class VisitableBase

setAttribute

public void setAttribute(java.lang.Object key,
                         java.lang.Object value)
Specified by:
setAttribute in interface Attributable

getAttribute

public java.lang.Object getAttribute(java.lang.Object key)
Specified by:
getAttribute in interface Attributable

getChildren

public java.util.List getChildren()

addChild

public void addChild(java.lang.Object child)

hasAttribute

public boolean hasAttribute(java.lang.String name)

getParent

public TreeNode getParent()
Returns:
Returns the parent.

removeAttribute

public java.lang.Object removeAttribute(java.lang.Object key)
Specified by:
removeAttribute in interface Attributable


Copyright © 2003 Hammurapi Group. All Rights Reserved.