net.sourceforge.combean.samples.simplegraphs
Class NumberNodeIterator

Package class diagram package NumberNodeIterator
java.lang.Object
  extended by net.sourceforge.combean.samples.simplegraphs.NumberNodeIterator
All Implemented Interfaces:
NodeIterator

public class NumberNodeIterator
extends Object
implements NodeIterator

An iterator through a sequence of NumberNodes with consecutive numbers.


Constructor Summary
NumberNodeIterator(int from, int to)
          Generate an iterator through a consecutive range of numbered nodes
 
Method Summary
 boolean hasNext()
          Check if further nodes exist for this iteration.
 Node next()
          Switch to the next node in the iteration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberNodeIterator

public NumberNodeIterator(int from,
                          int to)
Generate an iterator through a consecutive range of numbered nodes

Parameters:
from -
to -
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: NodeIterator
Check if further nodes exist for this iteration.

Specified by:
hasNext in interface NodeIterator
Returns:
true if there are further nodes
See Also:
NodeIterator.hasNext()

next

public Node next()
Description copied from interface: NodeIterator
Switch to the next node in the iteration.

Specified by:
next in interface NodeIterator
Returns:
the next node
See Also:
NodeIterator.next()