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, isForestEdge
public DefaultOrientedForestView(Graph graph, org.apache.commons.collections.Predicate parentPredicate, org.apache.commons.collections.Predicate childPredicate)
DefaultOrientedForestView
.public Graph getGraph()
GraphView
Graph
of which this is a view.public Object getParent(Object node)
AbstractOrientedForest
null
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 OrientedForest
getParent
in class AbstractOrientedForest
public Graph.Edge getParentEdge(Object node)
OrientedForest
Edge
of the specified node, or
null
if it doesn't have one.getParentEdge
in interface OrientedForest
public Traverser childTraverser(Object node)
OrientedForest
childTraverser
in interface OrientedForest
public Collection rootNodes()
OrientedForest
rootNodes
in interface OrientedForest
public boolean isLeaf(Object node)
AbstractOrientedForest
true
if the specified node has no
children.isLeaf
in interface OrientedForest
isLeaf
in class AbstractOrientedForest
See 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.