| 
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.TrivialOrientedForestView
public class TrivialOrientedForestView
A trivial OrientedForest view of a Graph, where
  there is no forest structure.  No Graph.Edges
  are forest edges, and so all nodes are roots and leaves.
| 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()
Returns the Graph of which this is a view. | 
 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.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public TrivialOrientedForestView(Graph graph)
TrivialForestView with strict node-
  and edge-checking semantics.
public TrivialOrientedForestView(Graph graph,
                                 boolean isStrict)
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.
| Method Detail | 
|---|
public Graph getGraph()
GraphViewGraph of which this is a view.
getGraph in interface GraphViewpublic Object getParent(Object node)
null.
  Description copied from interface: OrientedForest
 Gets the parent of the specified node, or null if
  it doesn't have one.  If null is a valid node,
  then OrientedForest.getParentEdge(java.lang.Object) must be used to distinguish the
  two cases.
getParent in interface OrientedForestpublic Traverser childTraverser(Object node)
Traverser.
  Description copied from interface: OrientedForest
 Traverses over the children of the specified node.
childTraverser in interface OrientedForestpublic Graph.Edge getParentEdge(Object node)
null.
  Description copied from interface: OrientedForest
 Gets the parent Edge of the specified node, or
  null if it doesn't have one.
getParentEdge in interface OrientedForestpublic boolean isForestEdge(Graph.Edge edge)
false.
  Description copied from interface: OrientedForest
 Gets whether or not the specified Edge is a
  forest edge.
isForestEdge in interface OrientedForestpublic Object getParentEndpoint(Graph.Edge edge)
IllegalArgumentException.
  Description copied from interface: OrientedForest
 Returns the parent endpoint of the specified forest
  Edge.  If the specified Edge is not
  a forest edge, throws an
  IllegalArgumentException.
getParentEndpoint in interface OrientedForestpublic Collection rootNodes()
Description copied from interface: OrientedForest
 Returns the root nodes of this forest.
rootNodes in interface OrientedForestpublic Object getRoot(Object node)
Description copied from interface: OrientedForest
 Gets the root of the subgraph containing the specified node.
getRoot in interface OrientedForestpublic boolean isLeaf(Object node)
true.
  Description copied from interface: OrientedForest
 Returns true if the specified node has no
  children.
isLeaf in interface OrientedForest
public boolean isAncestor(Object ancestor,
                          Object descendant)
true if the specified
  nodes are equal, and false otherwise.
  Description copied from interface: OrientedForest
 Returns true if ancestor is actually
  an ancestor of descendant.
isAncestor in interface OrientedForest
public Object getLeastCommonAncestor(Object aNode,
                                     Object bNode)
aNode if the
  specified nodes are equal, and null otherwise.
  Description copied from interface: OrientedForest
 Returns the least common ancestor of the specified nodes, or
  null if none exists.  If null is a
  valid node, then some other method must be used to distinguish
  the two cases.
getLeastCommonAncestor in interface OrientedForestpublic int getDepth(Object node)
0.
  Description copied from interface: OrientedForest
 Gets the depth of the specified node.
getDepth in interface OrientedForestpublic int getHeight(Object node)
0.
  Description copied from interface: OrientedForest
 Gets the height of the specified node.
getHeight in interface OrientedForest
  | 
Plexus v0.13.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||