- Type Parameters:
V- the graph vertex typeE- the graph edge type
- All Superinterfaces:
Iterator<V>
- All Known Implementing Classes:
AbstractGraphIterator,BreadthFirstIterator,ClosestFirstIterator,CrossComponentIterator,DegeneracyOrderingIterator,DepthFirstIterator,LexBreadthFirstIterator,MaximumCardinalityIterator,TopologicalOrderIterator
A graph iterator.
- Author:
- Barak Naveh
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the specified traversal listener to this iterator.booleanTest whether this iterator is set to traverse the graph across connected components.booleanTests whether thereuseEventsflag is set.voidremove()Unsupported.voidRemoves the specified traversal listener from this iterator.voidsetReuseEvents(boolean reuseEvents) Sets a value thereuseEventsflag.Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next
-
Method Details
-
isCrossComponentTraversal
boolean isCrossComponentTraversal()Test whether this iterator is set to traverse the graph across connected components.- Returns:
trueif traverses across connected components, otherwisefalse.
-
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.
-
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.
-
addTraversalListener
Adds the specified traversal listener to this iterator.- Parameters:
l- the traversal listener to be added.
-
removeTraversalListener
Removes the specified traversal listener from this iterator.- Parameters:
l- the traversal listener to be removed.
-
remove
void remove()Unsupported.- Specified by:
removein interfaceIterator<V>- Throws:
UnsupportedOperationException- always since operation is not supported
-