Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.common.util
Class FlexNode  view FlexNode download FlexNode.java

java.lang.Object
  extended bycom.flexstor.common.util.FlexNode
All Implemented Interfaces:
java.io.Serializable

public abstract class FlexNode
extends java.lang.Object
implements java.io.Serializable

General purpose node to provide support for building hierarchical data structures.


Field Summary
private  FlexNode parent
          Holds reference to the parent node.
private  java.util.Vector vChildren
          Holds references to children nodes.
 
Constructor Summary
protected FlexNode()
           
 
Method Summary
 void addChild(FlexNode node)
          Adds a child node to this node.
 void dispose()
          Release memory allocated by this node and all its children.
 java.util.Vector getChildren()
          Retrieves the children nodes this node has.
 int getChildrenCount()
          Retrieves the number of children nodes this node has.
 java.util.Vector getChildrenFlattened()
          Retrieves the descendency of this node in a "In-Order" recursive sequence.
 FlexNode getParent()
          Retrieves a reference to this node parent node.
 FlexNode getRoot()
          Retrieves a reference to the root node this node belongs to.
 boolean hasChildren()
          Verifies if this node has children nodes.
 void removeAllChildren()
          Removes all children nodes from this node.
 void removeChild(FlexNode node)
          Removes a child node from this node.
protected  void setParent(FlexNode parent)
          Sets this node parent node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

private FlexNode parent
Holds reference to the parent node.


vChildren

private java.util.Vector vChildren
Holds references to children nodes.

Constructor Detail

FlexNode

protected FlexNode()
Method Detail

setParent

protected void setParent(FlexNode parent)
Sets this node parent node.


getRoot

public FlexNode getRoot()
Retrieves a reference to the root node this node belongs to.


getParent

public FlexNode getParent()
Retrieves a reference to this node parent node.


hasChildren

public boolean hasChildren()
Verifies if this node has children nodes.


getChildrenCount

public int getChildrenCount()
Retrieves the number of children nodes this node has.


getChildren

public java.util.Vector getChildren()
Retrieves the children nodes this node has.


getChildrenFlattened

public java.util.Vector getChildrenFlattened()
Retrieves the descendency of this node in a "In-Order" recursive sequence.


addChild

public void addChild(FlexNode node)
Adds a child node to this node.


removeChild

public void removeChild(FlexNode node)
Removes a child node from this node.


removeAllChildren

public void removeAllChildren()
Removes all children nodes from this node.


dispose

public void dispose()
Release memory allocated by this node and all its children.