|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The GraphTraversal interface represents an algorithm with which to traverse or walk the graph. Using a visitor pattern, the GraphTraversal dispatches a GraphWalker to elements in the graph based on the traversing algorithm.
Field Summary | |
static int |
CONTINUE
flag to indicate that a traversal should continue |
static int |
STOP
flag to indivate that a traversal should top |
Method Summary | |
void |
finish()
Called when the traversal has been completed. |
Graph |
getGraph()
Returns the graph the traversal is being made upon. |
GraphWalker |
getWalker()
Returns the GraphWalker whom the traversal is dispatching to elements in the graph. |
void |
initEdges()
Initializes each Edge in the graph in preparation for the
traversal. |
void |
initNodes()
Initializes each Node in the graph in preparation for the
traversal. |
void |
walkEdges()
Performs the traversal over the edges of the graph. |
void |
walkNodes()
Performs the traversal over the nodes of the graph. |
Field Detail |
public static final int CONTINUE
public static final int STOP
Method Detail |
public void initNodes()
Node
in the graph in preparation for the
traversal.
public void initEdges()
Edge
in the graph in preparation for the
traversal.
public void walkNodes()
public void walkEdges()
public void finish()
public Graph getGraph()
public GraphWalker getWalker()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |