chemaxon.util.iterator
Interface MoleculeIterator

All Superinterfaces:
java.util.Iterator<Molecule>

public interface MoleculeIterator
extends java.util.Iterator<Molecule>

Molecule iterator.

Since:
Marvin 5.1, 08/01/2008
Version:
5.3.2, 03/02/2010
Author:
Peter Csizmadia, Zsolt Mohacsi

Method Summary
 double estimateProgress()
          Estimates the iteration progress.
 java.lang.Throwable getThrowable()
          Deprecated. Not used. next() throws NoSuchElementException in case of error.
 boolean hasNext()
          Tests whether the iteration has more elements.
 Molecule next()
          Gets the next molecule.
 
Methods inherited from interface java.util.Iterator
remove
 

Method Detail

next

Molecule next()
Gets the next molecule.

Specified by:
next in interface java.util.Iterator<Molecule>
Returns:
the molecule or null at end of file
Throws:
java.util.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 java.util.Iterator<Molecule>
Returns:
true if the iterator has more elements, false if there are no more elements

getThrowable

java.lang.Throwable getThrowable()
Deprecated. Not used. next() throws NoSuchElementException in case of error.

Gets the exception which stopped the iteration. It should be called when hasNext() returns false.

Returns:
the exception if the iteration was stopped by an error, null if it stopped normally

estimateProgress

double estimateProgress()
Estimates the iteration progress.

Returns:
number between 0 and 1