Package com.chemaxon.calculations.io
Class SmilesMemoizingMoleculeIterator
- java.lang.Object
-
- com.google.common.collect.UnmodifiableIterator<T>
-
- com.google.common.collect.AbstractIterator<T>
-
- com.chemaxon.calculations.io.CloseableAbstractIterator<OrderedElement<E>>
-
- com.chemaxon.calculations.io.MemoizingIterator<Molecule,String>
-
- com.chemaxon.calculations.io.SmilesMemoizingMoleculeIterator
-
- All Implemented Interfaces:
CloseableIterator<OrderedElement<Molecule>>
,MemoizedSparseCollection<String>
,Closeable
,AutoCloseable
,Iterator<OrderedElement<Molecule>>
@PublicAPI @Beta public class SmilesMemoizingMoleculeIterator extends MemoizingIterator<Molecule,String>
ACloseableIterator
ofMolecule
s providing memoization ofSMILES
representation of returned structures. This is a convenience class based onMemoizingIterator
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 Summary
Constructors Constructor Description SmilesMemoizingMoleculeIterator(CloseableIterator<Molecule> mi, Function<Molecule,String> transformation, Consumer<Exception> errorHandler)
Construct.
-
Method Summary
-
Methods inherited from class com.chemaxon.calculations.io.MemoizingIterator
close, computeNext, getMemoized, getMemoizedFunction, getMemoizedIfPresent, getMemoizedOrDefault, getMemoizedOrDefaultFunction, size
-
Methods inherited from class com.google.common.collect.AbstractIterator
endOfData, hasNext, next, peek
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.chemaxon.calculations.io.CloseableIterator
forward, limit, limit, transform, transformIterator, transformMultipleElements
-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
-
-
-
Constructor Detail
-
SmilesMemoizingMoleculeIterator
public SmilesMemoizingMoleculeIterator(CloseableIterator<Molecule> mi, Function<Molecule,String> transformation, Consumer<Exception> errorHandler)
Construct.- Parameters:
mi
-CloseableIterator
ofMolecule
s to delegatetransformation
- Transformation to transformMolecule
toSMILES
errorHandler
- Error handler. Expecting errors in executing the transformation.
-
-