|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javautils.graph.templates.AdjacentIterTemplate
An abstract Template Method [Gamma1995] for iterating a graph based on the adjacency structure of the graph. Iteration based on the adjacency structure has some highly useful properties that make it worth implementing once as a template method.
Constructor Summary | |
AdjacentIterTemplate()
|
Method Summary | |
protected abstract void |
beginNode(java.lang.Object node)
Called once for each node before calling doEdge
for each edge from the node. |
protected abstract void |
doEdge(java.lang.Object edge)
Called once for each edge from a node. |
protected abstract void |
finishNode(java.lang.Object node)
Called once for each node after all edges from the node have been done. |
void |
iter(Graph graph)
Iterates over the graph and calls the event point methods. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AdjacentIterTemplate()
Method Detail |
protected abstract void beginNode(java.lang.Object node)
Called once for each node before calling doEdge
for each edge from the node.
protected abstract void doEdge(java.lang.Object edge)
Called once for each edge from a node.
protected abstract void finishNode(java.lang.Object node)
Called once for each node after all edges from the node have been done.
public final void iter(Graph graph)
Iterates over the graph and calls the event point methods.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |