|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectnet.sourceforge.combean.samples.simplegraphs.NumberNeighborIterator
public class NumberNeighborIterator
An iterator through the neighbors of a NumberNode.
| Constructor Summary | |
|---|---|
NumberNeighborIterator(NumberGraph graph,
NumberNode startNode)
Construct an iterator for the neighborhood of startNode in the given graph. |
|
| Method Summary | |
|---|---|
protected NumberNode |
getCurrNode()
The current node which corresponds to the next neighbor in the iteration. |
boolean |
hasNext()
Check if further edges exist for this iteration. |
Edge |
next()
Switch to the next edge in the iteration. |
protected void |
setCurrNode(NumberNode currNode)
Set the next neighbor node to be returned in the iteration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NumberNeighborIterator(NumberGraph graph,
NumberNode startNode)
graph - the graph where the nodes residestartNode - the node where the iteration starts| Method Detail |
|---|
protected final NumberNode getCurrNode()
protected final void setCurrNode(NumberNode currNode)
currNode - The currNode to set.public boolean hasNext()
EdgeIterator
hasNext in interface EdgeIteratorEdgeIterator.hasNext()public Edge next()
EdgeIterator
next in interface EdgeIteratorEdgeIterator.next()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||