org._3pq.jgrapht.traverse
Interface GraphIterator
- Iterator
- AbstractGraphIterator, BreadthFirstIterator, ClosestFirstIterator, CrossComponentIterator, DepthFirstIterator, TopologicalOrderIterator
public interface GraphIterator
extends Iterator
A graph iterator.
addTraversalListener
public void addTraversalListener(TraversalListener l)
Adds the specified traversal listener to this iterator.
l
- the traversal listener to be added.
isCrossComponentTraversal
public boolean isCrossComponentTraversal()
Test whether this iterator is set to traverse the grpah across connected
components.
true
if traverses across connected components,
otherwise false
.
isReuseEvents
public boolean isReuseEvents()
Tests whether the reuseEvents
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.
- the value of the
reuseEvents
flag.
remove
public void remove()
Unsupported.
removeTraversalListener
public void removeTraversalListener(TraversalListener l)
Removes the specified traversal listener from this iterator.
l
- the traversal listener to be removed.
setReuseEvents
public void setReuseEvents(boolean reuseEvents)
Sets a value the reuseEvents
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.
reuseEvents
- whether to reuse previously fired event objects
instead of creating a new event object for each event.