Plexus v0.13.1

com.phoenixst.plexus.examples
Class Path

java.lang.Object
  extended by com.phoenixst.plexus.AbstractGraph
      extended by com.phoenixst.plexus.examples.AbstractIntegerNodeGraph
          extended by com.phoenixst.plexus.examples.Path
All Implemented Interfaces:
Graph, Serializable

public class Path
extends AbstractIntegerNodeGraph

A Graph containing a set of Integer nodes connected by a path of edges from the first node to the last one.

Since:
1.0
Version:
$Revision: 1.29 $
Author:
Ray A. Conner
See Also:
Serialized Form

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
Path(int n)
          Creates a new Path.
 
Method Summary
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 the degree of node, defined as the number of edges incident on node.
 String toString()
           
 
Methods inherited from class com.phoenixst.plexus.examples.AbstractIntegerNodeGraph
checkNode, containsEdge, containsNode, edges, getNodeIndex, getNodeSize, nodes, removeEdge, removeNode, traverser
 
Methods inherited from class com.phoenixst.plexus.AbstractGraph
addEdge, addNode, adjacentNodes, degree, edges, getAdjacentNode, getEdge, getIncidentEdge, getNode, incidentEdges, nodes, traverser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Path

public Path(int n)
Creates a new Path.

Method Detail

degree

public int degree(Object node)
Returns the degree of node, defined as the number of edges incident on node.

Specified by:
degree in interface Graph
Overrides:
degree in class AbstractGraph
Parameters:
node - return the degree of this node.
Returns:
the degree of node.

createEdge

protected Graph.Edge createEdge(int tailIndex,
                                int headIndex)
Description copied from class: AbstractIntegerNodeGraph
If an edge exists between the specified indices, create and return it. If not, return null. The indices are assumed to represent valid nodes for this Graph.

Specified by:
createEdge in class AbstractIntegerNodeGraph

createEdgeCollection

protected Collection createEdgeCollection()
Description copied from class: AbstractIntegerNodeGraph
Creates the (single) collection of edges for this instance.

Specified by:
createEdgeCollection in class AbstractIntegerNodeGraph

createTraverser

protected Traverser createTraverser(int nodeIndex)
Description copied from class: AbstractIntegerNodeGraph
Creates a traverser with no filtering; assumes that the node index is valid.

Specified by:
createTraverser in class AbstractIntegerNodeGraph

toString

public String toString()
Overrides:
toString in class Object

Plexus v0.13.1

See the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.