|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg._3pq.jgrapht.traverse.AbstractGraphIterator
public abstract class AbstractGraphIterator
An empty implementation of a graph iterator to minimize the effort required to implement graph iterators.
| Constructor Summary | |
|---|---|
AbstractGraphIterator()
|
|
| Method Summary | |
|---|---|
void |
addTraversalListener(TraversalListener l)
Adds the specified traversal listener to this iterator. |
protected void |
fireConnectedComponentFinished(ConnectedComponentTraversalEvent e)
Informs all listeners that the traversal of the current connected component finished. |
protected void |
fireConnectedComponentStarted(ConnectedComponentTraversalEvent e)
Informs all listeners that a traversal of a new connected component has started. |
protected void |
fireEdgeTraversed(EdgeTraversalEvent e)
Informs all listeners that a the specified edge was visited. |
protected void |
fireVertexTraversed(VertexTraversalEvent e)
Informs all listeners that a the specified vertex was visited. |
boolean |
isCrossComponentTraversal()
Test whether this iterator is set to traverse the graph across connected components. |
boolean |
isReuseEvents()
Tests whether the reuseEvents flag is set. |
void |
remove()
Unsupported. |
void |
removeTraversalListener(TraversalListener l)
Removes the specified traversal listener from this iterator. |
void |
setCrossComponentTraversal(boolean crossComponentTraversal)
Sets the cross component traversal flag - indicates whether to traverse the graph across connected components. |
void |
setReuseEvents(boolean reuseEvents)
Sets a value the reuseEvents flag. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Iterator |
|---|
hasNext, next |
| Constructor Detail |
|---|
public AbstractGraphIterator()
| Method Detail |
|---|
public void setCrossComponentTraversal(boolean crossComponentTraversal)
crossComponentTraversal - if true traverses across
connected components.public boolean isCrossComponentTraversal()
isCrossComponentTraversal in interface GraphIteratortrue if traverses across connected components,
otherwise false.public void setReuseEvents(boolean reuseEvents)
GraphIteratorreuseEvents flag. If the
reuseEvents flag is set to true this class
will reuse previously fired events and will not create a new object for
each event. This option increases performance but should be used with
care, especially in multithreaded environment.
setReuseEvents in interface GraphIteratorreuseEvents - whether to reuse previously fired event objects
instead of creating a new event object for each event.GraphIterator.setReuseEvents(boolean)public boolean isReuseEvents()
GraphIteratorreuseEvents flag is set. If the flag is
set to true this class will reuse previously fired events
and will not create a new object for each event. This option increases
performance but should be used with care, especially in multithreaded
environment.
isReuseEvents in interface GraphIteratorreuseEvents flag.GraphIterator.isReuseEvents()public void addTraversalListener(TraversalListener l)
addTraversalListener in interface GraphIteratorl - the traversal listener to be added.public void remove()
remove in interface java.util.Iteratorremove in interface GraphIteratorjava.lang.UnsupportedOperationExceptionpublic void removeTraversalListener(TraversalListener l)
removeTraversalListener in interface GraphIteratorl - the traversal listener to be removed.protected void fireConnectedComponentFinished(ConnectedComponentTraversalEvent e)
e - the connected component finished event.protected void fireConnectedComponentStarted(ConnectedComponentTraversalEvent e)
e - the connected component started event.protected void fireEdgeTraversed(EdgeTraversalEvent e)
e - the edge traversal event.protected void fireVertexTraversed(VertexTraversalEvent e)
e - the vertex traversal event.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||