org.apache.commons.graph.algorithm.util
Class PathImpl

java.lang.Object
  extended byorg.apache.commons.graph.algorithm.util.PathImpl
All Implemented Interfaces:
Path

public class PathImpl
extends java.lang.Object
implements Path


Field Summary
protected  java.util.List edgeList
           
protected  java.util.List vertexList
           
 
Constructor Summary
PathImpl(java.util.List vertexList, java.util.List edgeList)
           
PathImpl(Vertex start)
           
PathImpl(Vertex start, Vertex end, Edge edge)
           
 
Method Summary
 PathImpl append(PathImpl impl)
           
 PathImpl append(Vertex v, Edge e)
           
 java.util.List getEdges()
          getEdges() - This returns a list of Edges which comprise the path.
 Vertex getEnd()
          Returns the end of the path.
 Vertex getStart()
          Returns the start of the path.
 java.util.List getVertices()
          getVertices() - This returns a list of Vertices, in order as they go from Start to End.
 int size()
          size() - This returns the size of the path in terms of number of verticies it visits.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

vertexList

protected java.util.List vertexList

edgeList

protected java.util.List edgeList
Constructor Detail

PathImpl

public PathImpl(java.util.List vertexList,
                java.util.List edgeList)

PathImpl

public PathImpl(Vertex start)

PathImpl

public PathImpl(Vertex start,
                Vertex end,
                Edge edge)
Method Detail

append

public PathImpl append(PathImpl impl)

append

public PathImpl append(Vertex v,
                       Edge e)

getStart

public Vertex getStart()
Description copied from interface: Path
Returns the start of the path.

Specified by:
getStart in interface Path

getEnd

public Vertex getEnd()
Description copied from interface: Path
Returns the end of the path.

Specified by:
getEnd in interface Path

getVertices

public java.util.List getVertices()
Description copied from interface: Path
getVertices() - This returns a list of Vertices, in order as they go from Start to End. This includes the Start and End vertex, and will have one more entry than the Edges list.

Specified by:
getVertices in interface Path

getEdges

public java.util.List getEdges()
Description copied from interface: Path
getEdges() - This returns a list of Edges which comprise the path. It will have one less than the list of Vertices.

Specified by:
getEdges in interface Path

size

public int size()
Description copied from interface: Path
size() - This returns the size of the path in terms of number of verticies it visits.

Specified by:
size in interface Path

toString

public java.lang.String toString()