com.webmethods.caf.faces.data.tree.object
Class DefaultNode

java.lang.Object
  extended by com.webmethods.caf.faces.data.tree.object.DefaultNode
All Implemented Interfaces:
INode, Serializable
Direct Known Subclasses:
BoundChildrenNode

public class DefaultNode
extends Object
implements INode, Serializable

Default INode implementation.

See Also:
Serialized Form

Field Summary
protected  List m_children
           
protected  Object m_data
           
protected  String m_id
           
protected  INode m_parent
           
 
Constructor Summary
DefaultNode()
          Default constructor.
DefaultNode(Object data)
          Construct new instance and set data.
DefaultNode(Object data, String id)
          Construct new instance and set data and id.
 
Method Summary
 void addChild(INode child)
          Add child.
 List getChildren()
          List of INode children, in order.
 Object getData()
          Row data.
 String getId()
          Row id.
 INode getParent()
          Node parent, or null for root.
 void removeChild(INode child)
          Remove child.
 void setChildren(List children)
          Set node children.
 void setData(Object data)
          Set node data.
 void setId(String id)
          Set node id.
 void setParent(INode parent)
          Set node parent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_data

protected Object m_data

m_id

protected String m_id

m_parent

protected INode m_parent

m_children

protected List m_children
Constructor Detail

DefaultNode

public DefaultNode()
Default constructor.


DefaultNode

public DefaultNode(Object data)
Construct new instance and set data.

Parameters:
data -

DefaultNode

public DefaultNode(Object data,
                   String id)
Construct new instance and set data and id.

Parameters:
data -
id -
Method Detail

getData

public Object getData()
Description copied from interface: INode
Row data.

Specified by:
getData in interface INode

getId

public String getId()
Description copied from interface: INode
Row id.

Specified by:
getId in interface INode

getParent

public INode getParent()
Description copied from interface: INode
Node parent, or null for root.

Specified by:
getParent in interface INode

getChildren

public List getChildren()
Description copied from interface: INode
List of INode children, in order. Empty list (non-null) for leaf nodes.

Specified by:
getChildren in interface INode

setData

public void setData(Object data)
Set node data.


setId

public void setId(String id)
Set node id.

Parameters:
id -

setParent

public void setParent(INode parent)
Set node parent.

Parameters:
parent -

setChildren

public void setChildren(List children)
Set node children.

Parameters:
children -

addChild

public void addChild(INode child)
Add child.

Parameters:
child -
See Also:
List.add(Object)

removeChild

public void removeChild(INode child)
Remove child.

Parameters:
child -
See Also:
List.remove(Object)