Class IteratorFactory.SgroupIterator

java.lang.Object
chemaxon.util.iterator.IteratorFactory.SgroupIterator
All Implemented Interfaces:
Iterator<Sgroup>
Enclosing class:
IteratorFactory

public class IteratorFactory.SgroupIterator extends Object implements Iterator<Sgroup>
The SgroupIterator class provides an iterator for the s-groups of the specified molecule of the factory.
  • Constructor Details

    • SgroupIterator

      public SgroupIterator()
      Constructs an s-group iterator for the specified molecule of the factory.
  • Method Details

    • hasNext

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

      public Sgroup next()
      Returns the next s-group in the iteration.
      Specified by:
      next in interface Iterator<Sgroup>
      Returns:
      the next s-group in the iteration.
      Throws:
      NoSuchElementException
    • remove

      public void remove()
      Removes the next s-group in the iteration. This method can be called only once per call to next.
      Specified by:
      remove in interface Iterator<Sgroup>
      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.