public abstract class IteratorFactory.NeighbourIterator<E> extends Object implements Iterator<E>
NeighbourIterator
class provides an iterator to process
the bonds connecting to the specified atom according to the atom and bond
related behavior of this factory.Modifier and Type | Field and Description |
---|---|
protected MolAtom |
atom
The atom whose the neighbours are processed.
|
protected int |
currentBond
Current bond pointer of the iterator.
|
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).
|
Constructor and Description |
---|
IteratorFactory.NeighbourIterator(MolAtom atom)
Constructs an iterator to process the bonds connecting to the
specified atom.
|
Modifier and Type | Method and Description |
---|---|
protected MolBond |
getBond(int index)
Returns a bond of a specified index.
|
boolean |
hasNext()
Decides whether the iteration has more element.
|
protected int |
nextBondIndex(int index)
Returns the next bond index in the iteration according to the atom
and bond related behavior specified in the factory.
|
void |
remove()
The remove operation is not supported by this Iterator
implementation.
|
protected MolAtom atom
protected int currentBond
protected List<MolBond> secondaryBonds
public IteratorFactory.NeighbourIterator(MolAtom atom)
atom
- the atom whose bonds to be iteratedprotected MolBond getBond(int index)
index
- the specified index of the bondpublic boolean hasNext()
protected int nextBondIndex(int index)
index
- the current index to get the subsequent index frompublic void remove()
remove
in interface Iterator<E>
UnsupportedOperationException
Iterator.remove()