This class encpasulates a "Graph data structure".
A tree node may have at most one parent and 0 or more children. DefaultTreeNode provides operations for examining and modifying a node's parent and children and also operations for examining the tree that the node is a part of. A node's tree is the set of all nodes that can be reached by starting at the node and following all the possible links to parents and children. A node with no parent is the root of its tree; a node with no children is a leaf. A tree may consist of many subtrees, each node acting as the root for its own subtree.
This class provides enumerations for efficiently traversing a tree or subtree in various orders or for following the path between two nodes. A MutableTreeNode may also hold a reference to a user object, the use of which is left to the user. Asking a DefaultTreeNode for its string representation with toString() returns the string representation of its user object. @version 1.0 @author Sachin Mittal
|
|
|
|