Class IteratorFactory.AtomIterator

  • All Implemented Interfaces:
    Iterator<MolAtom>
    Enclosing class:
    IteratorFactory

    public class IteratorFactory.AtomIterator
    extends Object
    implements Iterator<MolAtom>
    The AtomIterator 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 Detail

      • AtomIterator

        public AtomIterator()
        Constructs an atom iterator for the specified molecule of the factory according to the atom related behavior set in the factory.
    • Method Detail

      • hasNext

        public boolean hasNext()
        Decides whether the iteration has more element.
        Specified by:
        hasNext in interface Iterator<MolAtom>
        Returns:
        true if the iteration has more element, false otherwise.
      • nextAtom

        @Deprecated
        public MolAtom nextAtom()
        Deprecated.
        As of Marvin 6.2, Use next() instead.
        Returns the next atom in the iteration.
        Returns:
        the next atom in the iteration.
      • remove

        public void remove()
        Removes the next atom in the iteration. This method can be called only once per call to next.
        Specified by:
        remove in interface Iterator<MolAtom>
        Throws:
        IllegalStateException - if the next method has not yet been called, or the remove method has already been called after the last call to the next method.