Package chemaxon.util.iterator
Class IteratorFactory.BondIterator
java.lang.Object
chemaxon.util.iterator.IteratorFactory.BondIterator
- Enclosing class:
- IteratorFactory
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
Modifier and TypeFieldDescriptionSecondary 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
ConstructorDescriptionConstructs 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 TypeMethodDescriptionprotected MolBond
getBond
(int index) Returns a bond of a specified index.boolean
hasNext()
Decides whether the iteration has more element.next()
Returns the next bond in the iteration.nextBond()
Deprecated, for removal: This API element is subject to removal in a future version.void
remove()
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
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
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 tonext
.- Specified by:
remove
in interfaceIterator<MolBond>
- 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.
-
hasNext
public boolean hasNext()Decides whether the iteration has more element. -
nextBond
Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.2, Usenext()
instead.Returns the next bond in the iteration.- Returns:
- the next bond in the iteration
-
next
Returns the next bond in the iteration.- Specified by:
next
in interfaceIterator<MolBond>
- Returns:
- the next bond in the iteration
- Throws:
NoSuchElementException
-
next()
instead.