Proxy iterable for iterating edges, users can either get
EdgeIterator
or directly getting an
Edge
array.
This iterable has an additionnal feature, it automatically lock the graph when the iterator is called and unlock it when iterator terminates. That means calling break
before the iterator terminates won't unlock the graph. The doBreak()
method will properly unlock the graph. Note that calling toArray()
avoid this issue.
If you're not sure if the graph is properly unlocked, for instance when exception are thrown within the loop, use {@link Graph#readUnlockAll()}.
@author Mathieu Bastian
@see Graph#readLock()