|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NodeIterable
Proxy iterable for iterating nodes, users can either get 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 Graph.readUnlockAll()
.
Graph.readLock()
Method Summary | |
---|---|
void |
doBreak()
Perform unlocking in case the iterator was terminated before normal end. |
NodeIterator |
iterator()
Returns the node iterator. |
Node[] |
toArray()
Returns the content of the iterable directly as an array. |
Method Detail |
---|
NodeIterator iterator()
iterator
in interface java.lang.Iterable<Node>
void doBreak()
Node[] toArray()
|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |