V
- the graph vertex typeE
- the graph edge typepublic interface GraphIterator<V,E> extends Iterator<V>
Modifier and Type | Method and Description |
---|---|
void |
addTraversalListener(TraversalListener<V,E> l)
Adds the specified traversal listener to this iterator.
|
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<V,E> l)
Removes the specified traversal listener from this iterator.
|
void |
setReuseEvents(boolean reuseEvents)
Sets a value the
reuseEvents flag. |
forEachRemaining, hasNext, next
boolean isCrossComponentTraversal()
true
if traverses across connected components, otherwise
false
.boolean isReuseEvents()
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.reuseEvents
flag.void setReuseEvents(boolean reuseEvents)
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.void addTraversalListener(TraversalListener<V,E> l)
l
- the traversal listener to be added.void removeTraversalListener(TraversalListener<V,E> l)
l
- the traversal listener to be removed.void remove()
remove
in interface Iterator<V>
UnsupportedOperationException
- always since operation is not supportedCopyright © 2019. All rights reserved.