Class IteratorFactory.BondIterator

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

public class IteratorFactory.BondIterator extends Object implements Iterator<MolBond>
The BondIterator class provides an iterator to process the bonds of the specified molecule in this factory according to the bond related behavior of this factory.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected List<MolBond>
    Secondary bonds that replace a coordinate bond to the multicenter with coordinate bonds from the metal to the represented atoms (in the MulticenterSgroup of the multicenter).
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an iterator to process the bonds of the specified molecule in this factory according to the bond related behavior of this factory.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected MolBond
    getBond(int index)
    Returns a bond of a specified index.
    boolean
    Decides whether the iteration has more element.
    Returns the next bond in the iteration.
    Deprecated, for removal: This API element is subject to removal in a future version.
    As of Marvin 6.2, Use next() instead.
    void
    Removes the next bond 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
  • Field Details

    • secondaryBonds

      protected List<MolBond> secondaryBonds
      Secondary bonds that replace a coordinate bond to the multicenter with coordinate bonds from the metal to the represented atoms (in the MulticenterSgroup of the multicenter). These secondary bonds are not added to the molecule of the factory, so do not use Molecule.indexOf for the secondary bonds! In the future, secondary bonds may be implemented for other types of connections too.
  • Constructor Details

    • BondIterator

      public BondIterator()
      Constructs an iterator to process the bonds of the specified molecule in this factory according to the bond related behavior of this factory.
  • Method Details

    • getBond

      protected MolBond getBond(int index)
      Returns a bond of a specified index.
      Parameters:
      index - the specified index of the bond
      Returns:
      the bond of the specified index
    • remove

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

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

      Deprecated, for removal: This API element is subject to removal in a future version.
      As of Marvin 6.2, Use next() instead.
      Returns the next bond in the iteration.
      Returns:
      the next bond in the iteration
    • next

      public MolBond next()
      Returns the next bond in the iteration.
      Specified by:
      next in interface Iterator<MolBond>
      Returns:
      the next bond in the iteration
      Throws:
      NoSuchElementException