| 
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.AbstractGraph
com.phoenixst.plexus.examples.AbstractIntegerNodeGraph
com.phoenixst.plexus.examples.EmptyGraph
public class EmptyGraph
A Graph containing a set of Integer
  nodes and no edges.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class com.phoenixst.plexus.examples.AbstractIntegerNodeGraph | 
|---|
AbstractIntegerNodeGraph.AbstractIntegerEdgeCollection, AbstractIntegerNodeGraph.EdgeImpl | 
| Nested classes/interfaces inherited from interface com.phoenixst.plexus.Graph | 
|---|
Graph.Edge | 
| Constructor Summary | |
|---|---|
EmptyGraph(int n)
Creates a new EmptyGraph. | 
|
| Method Summary | |
|---|---|
 Collection | 
adjacentNodes(Object node,
              org.apache.commons.collections.Predicate traverserPredicate)
Returns an empty Collection. | 
 boolean | 
containsEdge(Graph.Edge edge)
Returns false. | 
protected  Graph.Edge | 
createEdge(int tailIndex,
           int headIndex)
If an edge exists between the specified indices, create and return it.  | 
protected  Collection | 
createEdgeCollection()
Creates the (single) collection of edges for this instance.  | 
protected  Traverser | 
createTraverser(int nodeIndex)
Creates a traverser with no filtering; assumes that the node index is valid.  | 
 int | 
degree(Object node)
Returns 0. | 
 int | 
degree(Object node,
       org.apache.commons.collections.Predicate traverserPredicate)
Returns 0. | 
 Collection | 
edges(org.apache.commons.collections.Predicate edgePredicate)
Returns an empty Collection. | 
 Object | 
getAdjacentNode(Object node,
                org.apache.commons.collections.Predicate traverserPredicate)
Returns null. | 
 Graph.Edge | 
getEdge(org.apache.commons.collections.Predicate edgePredicate)
Returns null. | 
 Graph.Edge | 
getIncidentEdge(Object node,
                org.apache.commons.collections.Predicate traverserPredicate)
Returns null. | 
 Collection | 
incidentEdges(Object node,
              org.apache.commons.collections.Predicate traverserPredicate)
Returns an empty Collection. | 
 String | 
toString()
 | 
 Traverser | 
traverser(Object node,
          org.apache.commons.collections.Predicate traverserPredicate)
Returns an empty Traverser. | 
| Methods inherited from class com.phoenixst.plexus.examples.AbstractIntegerNodeGraph | 
|---|
checkNode, containsNode, edges, getNodeIndex, getNodeSize, nodes, removeEdge, removeNode, traverser | 
| Methods inherited from class com.phoenixst.plexus.AbstractGraph | 
|---|
addEdge, addNode, getNode, nodes | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public EmptyGraph(int n)
EmptyGraph.
| Method Detail | 
|---|
public boolean containsEdge(Graph.Edge edge)
false.
containsEdge in interface GraphcontainsEdge in class AbstractIntegerNodeGraphedge - the Graph.Edge whose presence in this
  Graph is to be tested.
true if this Graph contains
  the specified Graph.Edge.public int degree(Object node)
0.
degree in interface Graphdegree in class AbstractGraphnode - return the degree of this node.
node.
public int degree(Object node,
                  org.apache.commons.collections.Predicate traverserPredicate)
0.
degree in interface Graphdegree in class AbstractGraphnode - return the degree of this node for which the
  specified predicate is satisfied.traverserPredicate - the predicate which the counted
  Graph.Edges must satisfy.
node for which the
  specified predicate is satisfied.public Collection edges(org.apache.commons.collections.Predicate edgePredicate)
Collection.
edges in interface Graphedges in class AbstractGraphedgePredicate - the predicate which the returned
  Graph.Edges must satisfy.
Graph.Edges from this
  Graph that satisfy the specified
  predicate.
public Collection adjacentNodes(Object node,
                                org.apache.commons.collections.Predicate traverserPredicate)
Collection.
adjacentNodes in interface GraphadjacentNodes in class AbstractGraphnode - return the nodes adjacent to this node for which
  the specified predicate is satisfied.traverserPredicate - the predicate which the returned
  nodes and the traversed Graph.Edges must satisfy.
node
  for which the specified predicate is satisfied.
public Collection incidentEdges(Object node,
                                org.apache.commons.collections.Predicate traverserPredicate)
Collection.
incidentEdges in interface GraphincidentEdges in class AbstractGraphnode - return the Graph.Edges incident on
  this node for which the specified predicate is satisfied.traverserPredicate - the predicate which the returned
  Graph.Edges must satisfy.
Graph.Edges incident on the specified
  node for which the specified predicate is
  satisfied.public Graph.Edge getEdge(org.apache.commons.collections.Predicate edgePredicate)
null.
getEdge in interface GraphgetEdge in class AbstractGraphedgePredicate - the predicate which the returned
  Graph.Edge must satisfy.
Graph.Edge from this Graph
  that satisfies the specified predicate, or
  null if no such Graph.Edge exists.
public Object getAdjacentNode(Object node,
                              org.apache.commons.collections.Predicate traverserPredicate)
null.
getAdjacentNode in interface GraphgetAdjacentNode in class AbstractGraphnode - traverse to a node adjacent to this node for which
  the specified predicate is satisfied.traverserPredicate - the predicate which the returned
  node and the traversed Graph.Edge must satisfy.
node for
  which the specified predicate is satisfied.
public Graph.Edge getIncidentEdge(Object node,
                                  org.apache.commons.collections.Predicate traverserPredicate)
null.
getIncidentEdge in interface GraphgetIncidentEdge in class AbstractGraphnode - traverse to a Graph.Edge incident on
  this node for which the specified predicate is satisfied.traverserPredicate - the predicate which the returned
  Graph.Edge must satisfy.
Graph.Edge incident on the specified
  node for which the specified predicate is
  satisfied.
public Traverser traverser(Object node,
                           org.apache.commons.collections.Predicate traverserPredicate)
Traverser.
traverser in interface Graphtraverser in class AbstractGraphnode - traverse over all nodes adjacent to this node for
  which the specified predicate is satisfied.traverserPredicate - the predicate which the returned
  nodes and their traversed Graph.Edges must
  satisfy.
Traverser from node to all
  adjacent nodes for which the specified predicate is satisfied.
protected Graph.Edge createEdge(int tailIndex,
                                int headIndex)
AbstractIntegerNodeGraphnull.  The indices are
  assumed to represent valid nodes for this Graph.
createEdge in class AbstractIntegerNodeGraphprotected Collection createEdgeCollection()
AbstractIntegerNodeGraph
createEdgeCollection in class AbstractIntegerNodeGraphprotected Traverser createTraverser(int nodeIndex)
AbstractIntegerNodeGraph
createTraverser in class AbstractIntegerNodeGraphpublic String toString()
toString in class Object
  | 
Plexus v0.13.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||