com.phoenixst.plexus
public interface RootedTree extends OrientedForest, Rooted
The following methods behave as expected:
The getRoot( node )
method will throw
a NoSuchNodeException
if given a node which is not a
descendant of the root node.
The following methods may throw a
NoSuchNodeException
if given a node which is not a
descendant of the root node, depending upon whether or not it is
computationally tenable to do so. The behavior of any concrete
implementations of these methods should be explicitly documented.
getParent( node )
childTraverser( node )
getParentEdge( node )
isLeaf( node )
isAncestor( ancestor, descendant )
getLeastCommonAncestor( aNode, bNode )
getDepth( node )
getHeight( node )
Since: 1.0
Version: $Revision: 1.3 $
Method Summary | |
---|---|
boolean | isTreeNode(Object node)
Returns true if the specified node is a
descendant of the root node. |
true
if the specified node is a
descendant of the root node.