Package chemaxon.util.iterator
Class IteratorFactory.AtomIterator
- java.lang.Object
-
- chemaxon.util.iterator.IteratorFactory.AtomIterator
-
- Enclosing class:
- IteratorFactory
public class IteratorFactory.AtomIterator extends Object implements Iterator<MolAtom>
TheAtomIterator
class provides an iterator for the atoms of the specified molecule of the factory according to the atom related behavior set in the factory.
-
-
Constructor Summary
Constructors Constructor Description AtomIterator()
Constructs an atom iterator for the specified molecule of the factory according to the atom related behavior set in the factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
hasNext()
Decides whether the iteration has more element.MolAtom
next()
Returns the next atom in the iteration.MolAtom
nextAtom()
Deprecated.As of Marvin 6.2, Usenext()
instead.void
remove()
Removes the next atom in the iteration.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
Decides whether the iteration has more element.
-
nextAtom
@Deprecated public MolAtom nextAtom()
Deprecated.As of Marvin 6.2, Usenext()
instead.Returns the next atom in the iteration.- Returns:
- the next atom in the iteration.
-
next
public MolAtom next()
Returns the next atom in the iteration.- Specified by:
next
in interfaceIterator<MolAtom>
- Returns:
- the next atom in the iteration.
- Throws:
NoSuchElementException
- iteration has no more elements.
-
remove
public void remove()
Removes the next atom in the iteration. This method can be called only once per call tonext
.- Specified by:
remove
in interfaceIterator<MolAtom>
- Throws:
IllegalStateException
- if thenext
method has not yet been called, or the remove method has already been called after the last call to thenext
method.
-
-