Interface Generator<O>


public interface Generator<O>
Author:
Pierre Lecerf ([email protected]) Created on 2020/12/03
  • Method Summary

    Modifier and Type Method Description
    O generate()
    This method should return the next element of the stream each time it is called or null if it has reached the end.
    boolean hasNext()
    This method should return true if the generator is active, false otherwise.
  • Method Details

    • hasNext

      boolean hasNext()
      This method should return true if the generator is active, false otherwise. An active generator still has elements to provide, an inactive generator effectively means the stream is dried up.
      Returns:
      true if the generator is still active, false otherwise
    • generate

      O generate() throws GenerationException
      This method should return the next element of the stream each time it is called or null if it has reached the end.
      Throws:
      GenerationException