y25.base
Interface GraphCursor

All Superinterfaces:
YCursor

public interface GraphCursor
extends YCursor

A cursor interface for interating over graphs.

The typical use in conjunction with a LayeredGraph instance is as follows:

 LayeredGraph lg; // a layered graph
 for (GraphCursor gc = lg.graphs(); gc.ok(); gc.next()) {
 	Graph g = gc.graph();
 	// ... do something with the current graph ...
 }
 


Method Summary
 void cyclicNext()
          Moves the cursor to the cyclic next element of the underlying sequence.
 void cyclicPrev()
          Moves the cursor to the cyclic previous element of the underlying sequence.
 Graph graph()
          Returns the graph at the current location of the cursor.
 
Methods inherited from interface y.base.YCursor
current, next, ok, prev, size, toFirst, toLast
 

Method Detail

graph

public Graph graph()
Returns the graph at the current location of the cursor.

Returns:
The graph currently pointed to by this cursor.

cyclicNext

public void cyclicNext()
Moves the cursor to the cyclic next element of the underlying sequence. This is the next element if available, else it is the first element.


cyclicPrev

public void cyclicPrev()
Moves the cursor to the cyclic previous element of the underlying sequence. This is the previous element if available, else it is the last element.