Class GCodedSequencesIterator

java.lang.Object
com.glitchybyte.glib.combinatorics.GCodedSequencesIterator
All Implemented Interfaces:
Iterator<int[]>

public final class GCodedSequencesIterator extends Object implements Iterator<int[]>
Iterator class for coded sequences.
  • Constructor Details

    • GCodedSequencesIterator

      public GCodedSequencesIterator(GCodedSequencesGenerator codedGenerator)
      Creates a coded sequence iterator with the characteristics described in codedGenerator.
      Parameters:
      codedGenerator - Describes the characteristics for this iterator.
  • Method Details

    • hasNext

      public boolean hasNext()
      Returns true if the iteration has more elements. (In other words, returns true if next() would return an element rather than throwing an exception.)
      Specified by:
      hasNext in interface Iterator<int[]>
      Returns:
      true if the iteration has more elements
    • next

      public int[] next()
      Returns the next element in the iteration.
      Specified by:
      next in interface Iterator<int[]>
      Returns:
      the next element in the iteration
      Throws:
      NoSuchElementException - if the iteration has no more elements