|
Plexus v0.13.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.phoenixst.plexus.AbstractOrientedForest
com.phoenixst.plexus.DefaultOrientedForestView
com.phoenixst.plexus.DefaultRootedTreeView
public class DefaultRootedTreeView
A default view implementation of the RootedTree
interface.
Constructor Summary | |
---|---|
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 . |
Method Summary | |
---|---|
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 . |
Methods inherited from class com.phoenixst.plexus.DefaultOrientedForestView |
---|
childTraverser, getGraph, getParent, getParentEdge, isLeaf |
Methods inherited from class com.phoenixst.plexus.AbstractOrientedForest |
---|
getHeight, getLeastCommonAncestor, getParentEndpoint, isAncestor, isForestEdge |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.phoenixst.plexus.OrientedForest |
---|
childTraverser, getHeight, getLeastCommonAncestor, getParent, getParentEdge, getParentEndpoint, isAncestor, isForestEdge, isLeaf |
Constructor Detail |
---|
public DefaultRootedTreeView(Graph graph, org.apache.commons.collections.Predicate parentPredicate, org.apache.commons.collections.Predicate childPredicate)
DefaultRootedTreeView
.
public DefaultRootedTreeView(Graph graph, Object root, org.apache.commons.collections.Predicate parentPredicate, org.apache.commons.collections.Predicate childPredicate)
DefaultRootedTreeView
.
Method Detail |
---|
public boolean isTreeNode(Object node)
RootedTree
true
if the specified node is a
descendant of the root node.
isTreeNode
in interface RootedTree
public Object getRoot()
getRoot
in interface Rooted
public void setRoot(Object root)
Graph
.
setRoot
in interface Rooted
public Collection rootNodes()
OrientedForest
rootNodes
in interface OrientedForest
rootNodes
in class DefaultOrientedForestView
public Object getRoot(Object node)
AbstractOrientedForest
getRoot
in interface OrientedForest
getRoot
in class AbstractOrientedForest
public int getDepth(Object node)
NoSuchNodeException
.
getDepth
in interface OrientedForest
getDepth
in class AbstractOrientedForest
|
Plexus v0.13.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |