Interface MoleculeIterator

All Superinterfaces:
Iterator<Molecule>

@PublicApi public interface MoleculeIterator extends Iterator<Molecule>
Molecule iterator interface. Extends Iterator interface with an additional method to estimate the progress of the iteration.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Estimates the iteration progress.
    boolean
    Tests whether the iteration has more elements.
    Gets the next molecule.

    Methods inherited from interface java.util.Iterator

    forEachRemaining, remove
  • Method Details

    • next

      Molecule next()
      Gets the next molecule.
      Specified by:
      next in interface Iterator<Molecule>
      Returns:
      the molecule or null at end of file
      Throws:
      NoSuchElementException - if an error occurred, and the next element cannot be returned
    • hasNext

      boolean hasNext()
      Tests whether the iteration has more elements.
      Specified by:
      hasNext in interface Iterator<Molecule>
      Returns:
      true if the iterator has more elements, false if there are no more elements
    • estimateProgress

      double estimateProgress()
      Estimates the iteration progress.
      Returns:
      number between 0 and 1