chemaxon.util.iterator
Class IteratorFactory.BondIterator

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

public class IteratorFactory.BondIterator
extends java.lang.Object
implements java.util.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
protected  int currentBond
          Current bond index pointer of the iterator.
protected  java.util.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).
 
Constructor Summary
IteratorFactory.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 Summary
protected  MolBond getBond(int index)
          Returns a bond of a specified index.
 boolean hasNext()
          Decides whether the iteration has more element.
 MolBond next()
          Returns the next bond in the iteration.
 MolBond nextBond()
          Deprecated. Use next() instead.
 void remove()
          The remove operation is not supported by this Iterator implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentBond

protected int currentBond
Current bond index pointer of the iterator.


secondaryBonds

protected java.util.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 Detail

IteratorFactory.BondIterator

public IteratorFactory.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 Detail

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()
The remove operation is not supported by this Iterator implementation.

Specified by:
remove in interface java.util.Iterator<MolBond>
Throws:
java.lang.UnsupportedOperationException
See Also:
Iterator.remove()

hasNext

public boolean hasNext()
Decides whether the iteration has more element.

Specified by:
hasNext in interface java.util.Iterator<MolBond>
Returns:
true if the iteration has more element, false otherwise.

nextBond

public MolBond nextBond()
Deprecated. 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 java.util.Iterator<MolBond>
Returns:
the next bond in the iteration
Throws:
java.util.NoSuchElementException