chemaxon.util.iterator
Interface MoleculeIterator


public interface MoleculeIterator

Molecule iterator.

Since:
Marvin 5.1, 08/01/2008
Version:
5.1, 08/01/2008
Author:
Peter Csizmadia

Method Summary
 double estimateProgress()
          Estimates the iteration progress.
 java.lang.Throwable getThrowable()
          Gets the exception which stopped the iteration.
 boolean hasNext()
          Tests whether the iteration has more elements.
 Molecule next()
          Gets the next molecule.
 

Method Detail

next

Molecule next()
Gets the next molecule.

Returns:
the molecule or null at end of file or in case of an error
Throws:
NoSuchElementException - iteration has no more elements.
See Also:
getThrowable()

hasNext

boolean hasNext()
Tests whether the iteration has more elements.

Returns:
true if the iterator has more elements. false if there are no more elements or an error occured
See Also:
getThrowable()

getThrowable

java.lang.Throwable getThrowable()
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
See Also:
hasNext(), next()

estimateProgress

double estimateProgress()
Estimates the iteration progress.

Returns:
number between 0 and 1