public class DefaultRootedTreeView extends DefaultOrientedForestView implements RootedTree
RootedTree
interface.| Constructor and Description |
|---|
DefaultRootedTreeView(Graph graph,
Object root,
org.apache.commons.collections.Predicate parentPredicate,
org.apache.commons.collections.Predicate childPredicate)
Creates a new
DefaultRootedTreeView. |
DefaultRootedTreeView(Graph graph,
org.apache.commons.collections.Predicate parentPredicate,
org.apache.commons.collections.Predicate childPredicate)
Creates a new
DefaultRootedTreeView. |
| Modifier and Type | Method and Description |
|---|---|
int |
getDepth(Object node)
Gets the depth of the specified node.
|
Object |
getRoot()
Gets the root node.
|
Object |
getRoot(Object node)
Gets the root of the subgraph containing the specified node.
|
boolean |
isTreeNode(Object node)
Returns
true if the specified node is a
descendant of the root node. |
Collection |
rootNodes()
Returns the root nodes of this forest.
|
void |
setRoot(Object root)
Sets the root node, which must already be present in the
Graph. |
childTraverser, getGraph, getParent, getParentEdge, isLeafgetHeight, getLeastCommonAncestor, getParentEndpoint, isAncestor, isForestEdgeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchildTraverser, getHeight, getLeastCommonAncestor, getParent, getParentEdge, getParentEndpoint, isAncestor, isForestEdge, isLeafpublic DefaultRootedTreeView(Graph graph, org.apache.commons.collections.Predicate parentPredicate, org.apache.commons.collections.Predicate childPredicate)
DefaultRootedTreeView.public boolean isTreeNode(Object node)
RootedTreetrue if the specified node is a
descendant of the root node.isTreeNode in interface RootedTreepublic void setRoot(Object root)
Graph.public Collection rootNodes()
OrientedForestrootNodes in interface OrientedForestrootNodes in class DefaultOrientedForestViewpublic Object getRoot(Object node)
AbstractOrientedForestgetRoot in interface OrientedForestgetRoot in class AbstractOrientedForestpublic int getDepth(Object node)
NoSuchNodeException.getDepth in interface OrientedForestgetDepth in class AbstractOrientedForestSee the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.