Interface SequenceGenerator<T>

Type Parameters:
T - the type of elements in the sequence
All Known Implementing Classes:
CyclicIntegerSequence, RandomPermutationCycle

public interface SequenceGenerator<T>
Interface representing a generator of sequences of elements of type T.

Implementations of this interface provide a way to generate sequences of values that can be iterated through using the generateNext() and getValue() methods. The sequence can be of any length, as reported by getSequenceLength().

Typical usage:

 
 SequenceGenerator<Integer> generator = ...;
 for (int i = 0; i < generator.getSequenceLength(); i++) {
     int value = generator.getValue();
     // Use the value...
     generator.generateNext();
 }