|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
EdgeNodeIterator is a special iterator that iterates accross the pairs of nodes that make edges in a digraph.
next() is of type void. Use fromNode() and toNode() to get the fromNode and toNode values for the current edge.
Method Summary | |
java.lang.Object |
fromNode()
Returns the node that his edge begins at. |
boolean |
hasNext()
Returns true if there are more edges in this iterator. |
void |
next()
Advances to the next edge in the iterator. |
void |
remove()
Removes the current edge from the digraph. |
java.lang.Object |
toNode()
Returns the node that this edge reaches. |
Method Detail |
public boolean hasNext()
public void next()
NoSuchElementException
- if the iterator has nothing left.public void remove()
java.lang.UnsupportedOperationException
- if the digraph is immutable.
java.lang.IllegalStateException
- if the next method has not yet been called, or the remove method has already been called after the last call to the next method.public java.lang.Object fromNode()
java.lang.IllegalStateException
- if the next method has not yet been called, or the remove method has already been called after the last call to the next method.public java.lang.Object toNode()
java.lang.IllegalStateException
- if the next method has not yet been called, or the remove method has already been called after the last call to the next method.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |