@PublicAPI @Beta public class SmilesMemoizingMoleculeIterator extends MemoizingIterator<Molecule,String>
CloseableIterator
of Molecule
s providing memoization of SMILES
representation of returned
structures.
This is a convenience class based on MemoizingIterator
with fixed generic types. Note that this implementation
can be error tolerant depending on the error handler specified in
#SmilesMemoizingMoleculeIterator(com.chemaxon.calculations.io.CloseableIterator, com.google.common.base.Function, com.chemaxon.calculations.io.Sink)
.
Please note that this class is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.
Constructor and Description |
---|
SmilesMemoizingMoleculeIterator(CloseableIterator<Molecule> mi,
Function<Molecule,String> transformation,
Consumer<Exception> errorHandler)
Construct.
|
close, computeNext, getMemoized, getMemoizedFunction, getMemoizedIfPresent, getMemoizedOrDefault, getMemoizedOrDefaultFunction, size
endOfData, hasNext, next, peek
remove
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
transform
forEachRemaining, hasNext, next, remove
public SmilesMemoizingMoleculeIterator(CloseableIterator<Molecule> mi, Function<Molecule,String> transformation, Consumer<Exception> errorHandler)
mi
- CloseableIterator
of Molecule
s to delegatetransformation
- Transformation to transform Molecule
to SMILES
errorHandler
- Error handler. Expecting errors in executing the transformation.