|
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
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()
GraphViewGraph of which this is a view.
getGraph in interface GraphViewpublic 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)
OrientedForest
childTraverser in interface OrientedForestpublic Collection rootNodes()
OrientedForest
rootNodes in interface OrientedForestpublic boolean isLeaf(Object node)
AbstractOrientedForesttrue if the specified node has no
children.
isLeaf in interface OrientedForestisLeaf in class AbstractOrientedForest
|
Plexus v0.13.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||