Interface NodeIterator


public interface NodeIterator

Iterator for iterating over the nodes of a Graph, Path or Cycle.

Author:
Dries.VanDyck@rug.ac.be
See Also:
Path, Cycle, Graph

Method Summary
 boolean hasNext()
          Returns true if this is not the last node in the iteration, false otherwise.
 boolean hasPrevious()
          Returns true if this is not the first node in the iteration, false otherwise.
 int next()
          Returns the next node in this iteration or -1 if this is the last.
 int previous()
          Returns the previous node in this iteration or -1 if this is the first.
 

Method Detail

hasNext

public boolean hasNext()
Returns true if this is not the last node in the iteration, false otherwise.

Returns:
true if this is not the last node in the iteration, false otherwise.

next

public int next()
Returns the next node in this iteration or -1 if this is the last.

Returns:
the next node in this iteration or -1 if this is the last.

hasPrevious

public boolean hasPrevious()
Returns true if this is not the first node in the iteration, false otherwise.

Returns:
true if this is not the first node in the iteration, false otherwise.

previous

public int previous()
Returns the previous node in this iteration or -1 if this is the first.

Returns:
the previous node in this iteration or -1 if this is the first.