com.phoenixst.plexus
public class DefaultOrientedForest extends DefaultGraph implements OrientedForest
Since: 1.0
Version: $Revision: 1.21 $
Constructor Summary | |
---|---|
DefaultOrientedForest()
Creates a new DefaultOrientedForest . | |
DefaultOrientedForest(Graph graph)
Creates a new DefaultOrientedForest which is a
copy of the specified Graph . |
Method Summary | |
---|---|
Graph.Edge | addEdge(Object object, Object tail, Object head, boolean isDirected) |
Traverser | childTraverser(Object node) |
protected Graph.Edge | createEdge(Object object, Object tail, Object head, boolean isDirected, Object edgeState) |
int | getDepth(Object node) |
int | getHeight(Object node) |
Object | getLeastCommonAncestor(Object aNode, Object bNode) |
Object | getParent(Object node) |
Graph.Edge | getParentEdge(Object node) |
Object | getParentEndpoint(Graph.Edge edge) |
Object | getRoot(Object node) |
boolean | isAncestor(Object ancestor, Object descendant) |
boolean | isForestEdge(Graph.Edge edge) |
boolean | isLeaf(Object node) |
Collection | rootNodes() |
Graph.Edge | setParent(Object object, Object tail, Object head, boolean isDirected, Object parent)
Adds a new forest Edge . |
DefaultOrientedForest
.DefaultOrientedForest
which is a
copy of the specified Graph
.Edge
. The specified
parent
must be one of the specified endpoints.
If the child endpoint already has a parent edge, it will be
removed.