AtomsetIterator
, MoleculeIterator
, MoleculeIteratorMoleculeDependent
, MoleculesetIterator
, java.io.Serializable
public 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 MoleculeIteratorMoleculeDependent
public IMolecule getMolecule()
public int size()
size
in interface AtomsetIterator
public void unset()
unset
in interface AtomsetIterator
public void reset()
reset
in interface AtomsetIterator
public IMolecule nextMolecule()
nextMolecule
in interface MoleculeIterator
public IMoleculeList next()
MoleculesetIterator
next
in interface MoleculesetIterator
public final int nBody()
AtomsetIterator
nBody
in interface AtomsetIterator