public class DefaultOrientedForestView extends AbstractOrientedForest implements GraphView, Serializable
OrientedForest
interface.| Constructor and Description |
|---|
DefaultOrientedForestView(Graph graph,
org.apache.commons.collections.Predicate parentPredicate,
org.apache.commons.collections.Predicate childPredicate)
Creates a new
DefaultOrientedForestView. |
| Modifier and Type | Method and Description |
|---|---|
Traverser |
childTraverser(Object node)
Traverses over the children of the specified node.
|
Graph |
getGraph()
Returns the
Graph of which this is a view. |
Object |
getParent(Object node)
Gets the parent of the specified node, or
null if
it doesn't have one. |
Graph.Edge |
getParentEdge(Object node)
Gets the parent
Edge of the specified node, or
null if it doesn't have one. |
boolean |
isLeaf(Object node)
Returns
true if the specified node has no
children. |
Collection |
rootNodes()
Returns the root nodes of this forest.
|
getDepth, getHeight, getLeastCommonAncestor, getParentEndpoint, getRoot, isAncestor, isForestEdgepublic DefaultOrientedForestView(Graph graph, org.apache.commons.collections.Predicate parentPredicate, org.apache.commons.collections.Predicate childPredicate)
DefaultOrientedForestView.public Graph getGraph()
GraphViewGraph of which this is a view.public Object getParent(Object node)
AbstractOrientedForestnull if
it doesn't have one. If the graph may contain a
null node, then getParentEdge( node ) must be used to distinguish the two cases.getParent in interface OrientedForestgetParent in class AbstractOrientedForestpublic Graph.Edge getParentEdge(Object node)
OrientedForestEdge of the specified node, or
null if it doesn't have one.getParentEdge in interface OrientedForestpublic Traverser childTraverser(Object node)
OrientedForestchildTraverser in interface OrientedForestpublic Collection rootNodes()
OrientedForestrootNodes in interface OrientedForestpublic boolean isLeaf(Object node)
AbstractOrientedForesttrue if the specified node has no
children.isLeaf in interface OrientedForestisLeaf 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.