Class MemoizingIterator<E,R>

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<E,R>
Type Parameters:
E - Type of iterated elements from the base CloseableIterator
R - Type of transformed elements available for retrieval
All Implemented Interfaces:
CloseableIterator<OrderedElement<E>>, MemoizedSparseCollection<R>, Closeable, AutoCloseable, Iterator<OrderedElement<E>>
Direct Known Subclasses:
SmilesMemoizingMoleculeIterator

@PublicAPI @Beta @Deprecated(forRemoval=true) @SubjectToRemoval(date=JAN_01_2025) public class MemoizingIterator<E,R> extends com.chemaxon.calculations.io.CloseableAbstractIterator<OrderedElement<E>> implements MemoizedSparseCollection<R>
Deprecated, for removal: This API element is subject to removal in a future version.
Will be removed without replacement.
Decorate a CloseableIterator with the availability of retrieval of a transformation of the iterated elements.

Typical application is to remember SMILES structure sources of Molecules imported with a MolImporter.

It is recommended to access the memoized items use only after AbstractIterator.hasNext() is false. Otherwise new structure might be collected upon the next AbstractIterator.hasNext() or AbstractIterator.next() invocation.