|
Plexus v0.13.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.phoenixst.plexus.AbstractOrientedForest com.phoenixst.plexus.DefaultOrientedForestView
public class DefaultOrientedForestView
A default view implementation of the OrientedForest
interface.
Constructor Summary | |
---|---|
DefaultOrientedForestView(Graph graph,
org.apache.commons.collections.Predicate parentPredicate,
org.apache.commons.collections.Predicate childPredicate)
Creates a new DefaultOrientedForestView . |
Method Summary | |
---|---|
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. |
Methods inherited from class com.phoenixst.plexus.AbstractOrientedForest |
---|
getDepth, getHeight, getLeastCommonAncestor, getParentEndpoint, getRoot, isAncestor, isForestEdge |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultOrientedForestView(Graph graph, org.apache.commons.collections.Predicate parentPredicate, org.apache.commons.collections.Predicate childPredicate)
DefaultOrientedForestView
.
Method Detail |
---|
public Graph getGraph()
GraphView
Graph
of which this is a view.
getGraph
in interface GraphView
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
|
Plexus v0.13.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |