NodeIterator
or directly getting an Node
array. This iterable has an additionnal feature, it locks automatically the graph when the iterator is called and unlocks 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()
|
|
|
|
|
|
|
|
|
|
|
|
|
|