Interface Generator<T>

Type Parameters:
T - type of objects to create
All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
IntegerPartitionGenerator, MpiPartitionGenerator

public interface Generator<T>
extends java.io.Serializable
A generator for a sequence of objects of type . Generators differ from Iterators in that they do not have a backing Collection. Consequently, there is no need for a remove() method.
  • Method Summary

    Modifier and Type Method Description
    boolean hasNext()  
    T next()  
  • Method Details

    • hasNext

      boolean hasNext()
      Returns:
      true if there is another object to generate
    • next

      T next()
      Returns:
      next object