com.phoenixst.plexus
public class ForestTreeAdapter extends Object implements RootedTree
Since: 1.0
Version: $Revision: 1.9 $
Constructor Summary | |
---|---|
ForestTreeAdapter(Object root, OrientedForest forest, boolean isStrict)
Creates a new ForestTreeAdapter .
|
Method Summary | |
---|---|
Traverser | childTraverser(Object node) |
int | getDepth(Object node) |
int | getHeight(Object node) |
Object | getLeastCommonAncestor(Object aNode, Object bNode) |
Object | getParent(Object node) |
Graph.Edge | getParentEdge(Object node) |
Object | getParentEndpoint(Graph.Edge edge) |
Object | getRoot() |
Object | getRoot(Object node) |
boolean | isAncestor(Object ancestor, Object descendant) |
boolean | isForestEdge(Graph.Edge edge) |
boolean | isLeaf(Object node) |
boolean | isTreeNode(Object node) |
Collection | rootNodes() |
void | setRoot(Object root) |
ForestTreeAdapter
.
Parameters: root create a tree of the subgraph rooted at this
node.
forest the forest of which this tree is a subview.
isStrict if true
, all appropriate methods
accepting nodes will throw a NoSuchNodeException
if the argument node is not a descendant of the root node of
this tree. If false
, only getRoot( node )
and getDepth( node )
will throw an exception in this case.