Package org._3pq.jgrapht.traverse
Interface GraphIterator
-
- All Superinterfaces:
java.util.Iterator
- All Known Implementing Classes:
AbstractGraphIterator,BreadthFirstIterator,ClosestFirstIterator,CrossComponentIterator,DepthFirstIterator,TopologicalOrderIterator
public interface GraphIterator extends java.util.IteratorA graph iterator.- Since:
- Jul 31, 2003
- Author:
- Barak Naveh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddTraversalListener(TraversalListener l)Adds the specified traversal listener to this iterator.booleanisCrossComponentTraversal()Test whether this iterator is set to traverse the grpah across connected components.booleanisReuseEvents()Tests whether thereuseEventsflag is set.voidremove()Unsupported.voidremoveTraversalListener(TraversalListener l)Removes the specified traversal listener from this iterator.voidsetReuseEvents(boolean reuseEvents)Sets a value thereuseEventsflag.
-
-
-
Method Detail
-
isCrossComponentTraversal
boolean isCrossComponentTraversal()
Test whether this iterator is set to traverse the grpah across connected components.- Returns:
trueif traverses across connected components, otherwisefalse.
-
setReuseEvents
void setReuseEvents(boolean reuseEvents)
Sets a value thereuseEventsflag. If thereuseEventsflag is set totruethis 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.- Parameters:
reuseEvents- whether to reuse previously fired event objects instead of creating a new event object for each event.
-
isReuseEvents
boolean isReuseEvents()
Tests whether thereuseEventsflag is set. If the flag is set totruethis 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.- Returns:
- the value of the
reuseEventsflag.
-
addTraversalListener
void addTraversalListener(TraversalListener l)
Adds the specified traversal listener to this iterator.- Parameters:
l- the traversal listener to be added.
-
remove
void remove()
Unsupported.- Specified by:
removein interfacejava.util.Iterator- Throws:
java.lang.UnsupportedOperationException
-
removeTraversalListener
void removeTraversalListener(TraversalListener l)
Removes the specified traversal listener from this iterator.- Parameters:
l- the traversal listener to be removed.
-
-