AtomsetIterator, MoleculeIterator, MoleculeIteratorMoleculeDependent, MoleculesetIterator, java.io.Serializablepublic final class MoleculeIteratorSinglet extends java.lang.Object implements MoleculeIterator, MoleculeIteratorMoleculeDependent, java.io.Serializable
| Modifier and Type | Field | Description |
|---|---|---|
protected MoleculeSetSinglet |
atomSetSinglet |
| Constructor | Description |
|---|---|
MoleculeIteratorSinglet() |
Constructs iterator without defining atom.
|
MoleculeIteratorSinglet(IMolecule a) |
Constructs iterator specifying that it return the given atom.
|
| Modifier and Type | Method | Description |
|---|---|---|
IMolecule |
getMolecule() |
|
int |
nBody() |
Returns the number of atoms given in each iterate, i.e., the
size of the atom array returned with each call to next().
|
IMoleculeList |
next() |
Returns the next AtomSet iterate, or null if hasNext() is false.
|
IMolecule |
nextMolecule() |
Returns the iterator's atom and unsets iterator.
|
void |
reset() |
Resets iterator to a state where hasNext is true.
|
void |
setMolecule(IMolecule a) |
Defines atom returned by iterator and leaves iterator unset.
|
int |
size() |
returns 1 if atom is not null, 0 if atom is null.
|
void |
unset() |
Sets iterator to a state where hasNext() returns false.
|
protected final MoleculeSetSinglet atomSetSinglet
public MoleculeIteratorSinglet()
public MoleculeIteratorSinglet(IMolecule a)
a - The atom that will be returned by this iterator upon reset.public void setMolecule(IMolecule a)
setMolecule in interface MoleculeIteratorMoleculeDependentpublic IMolecule getMolecule()
public int size()
size in interface AtomsetIteratorpublic void unset()
unset in interface AtomsetIteratorpublic void reset()
reset in interface AtomsetIteratorpublic IMolecule nextMolecule()
nextMolecule in interface MoleculeIteratorpublic IMoleculeList next()
MoleculesetIteratornext in interface MoleculesetIteratorpublic final int nBody()
AtomsetIteratornBody in interface AtomsetIterator