com.phoenixst.plexus
public class TrivialOrientedForestView extends Object implements GraphView, OrientedForest
Graph.Edges
are forest edges, and so all nodes are roots and leaves.
Since: 1.0
Version: $Revision: 1.6 $
Constructor Summary | |
---|---|
TrivialOrientedForestView(Graph graph)
Creates a new TrivialForestView with strict node-
and edge-checking semantics. | |
TrivialOrientedForestView(Graph graph, boolean isStrict)
Creates a new TrivialForestView with the
specified node- and edge-checking semantics. |
Method Summary | |
---|---|
Traverser | childTraverser(Object node)
This implementation returns an empty Traverser .
|
int | getDepth(Object node)
This implementation returns 0 .
|
Graph | getGraph() |
int | getHeight(Object node)
This implementation returns 0 .
|
Object | getLeastCommonAncestor(Object aNode, Object bNode)
This implementation returns aNode if the
specified nodes are equal, and null otherwise.
|
Object | getParent(Object node)
This implementation returns null .
|
Graph.Edge | getParentEdge(Object node)
This implementation returns null .
|
Object | getParentEndpoint(Graph.Edge edge)
This implementation throws an
IllegalArgumentException .
|
Object | getRoot(Object node)
This implementation returns the specified node.
|
boolean | isAncestor(Object ancestor, Object descendant)
This implementation returns true if the specified
nodes are equal, and false otherwise.
|
boolean | isForestEdge(Graph.Edge edge)
This implementation returns false .
|
boolean | isLeaf(Object node)
This implementation returns true .
|
Collection | rootNodes()
This implementation returns all nodes.
|
TrivialForestView
with strict node-
and edge-checking semantics.TrivialForestView
with the
specified node- and edge-checking semantics. If
isStrict
is true
, passing in a node
or edge into this view which is not contained in the
underlying Graph
will cause an exception to be
thrown.Traverser
.
Description copied from interface: OrientedForest
{@inheritDoc }
0
.
Description copied from interface: OrientedForest
{@inheritDoc }
0
.
Description copied from interface: OrientedForest
{@inheritDoc }
aNode
if the
specified nodes are equal, and null
otherwise.
Description copied from interface: OrientedForest
{@inheritDoc }
null
.
Description copied from interface: OrientedForest
{@inheritDoc }
null
.
Description copied from interface: OrientedForest
{@inheritDoc }
IllegalArgumentException
.
Description copied from interface: OrientedForest
{@inheritDoc }
Description copied from interface: OrientedForest
{@inheritDoc }
true
if the specified
nodes are equal, and false
otherwise.
Description copied from interface: OrientedForest
{@inheritDoc }
false
.
Description copied from interface: OrientedForest
{@inheritDoc }
true
.
Description copied from interface: OrientedForest
{@inheritDoc }
Description copied from interface: OrientedForest
{@inheritDoc }