|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Path
An interface that abstracts a path in a graph. In this context, a path is a consecutive sequence of vertices from one vertex to another connected by edges.
The important word here is consecutive. Thus, implementations are required to make sure that if an Edge is added to a Path, that the Edge being added is between the last Vertex in the path to a new Vertex. If a Vertex is being added, that am Edge is created between the last Vertex in the Path to the new Vertex being added.
If an acyclic path is required, then implement the AcyclicPath interface instead.
Method Summary | |
---|---|
Vertex |
getFirstVertex()
Returns the first Vertex in the Path. |
Vertex |
getLastVertex()
Returns the last Vertex in the Path. |
void |
remove()
Removes the last Vertex that was added in the Path. |
Method Detail |
---|
Vertex getFirstVertex()
Vertex getLastVertex()
void remove() throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |