AtomsetIterator, AtomsetIteratorDirectable, MoleculesetIterator, MoleculesetIteratorBoxDependent, MoleculesetIteratorPDT, MoleculesetIteratorTargetable, java.io.Serializablepublic class MoleculeIteratorAll extends java.lang.Object implements MoleculesetIteratorPDT, java.io.Serializable
| Modifier and Type | Field | Description |
|---|---|---|
protected Box |
box |
|
protected MoleculeArrayList |
next |
|
protected int |
nextCursor |
|
protected boolean |
oneIterate |
|
protected ISpecies[] |
species |
| Constructor | Description |
|---|---|
MoleculeIteratorAll(ISpecies[] species) |
|
MoleculeIteratorAll(ISpecies[] species,
boolean oneIterate) |
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
void |
reset() |
Resets the iterator to loop through its iterates again.
|
void |
setBox(Box newBox) |
Sets the box containing the molecules for iteration.
|
void |
setDirection(IteratorDirective.Direction newDirection) |
Has no effect, but is included as part of the AtomsetIteratorPDT interface.
|
void |
setTarget(IMolecule newTargetAtom) |
Sets the target of iteration...
|
int |
size() |
Returns the number of iterates given by this iterator, if iterated after
a call to reset().
|
void |
unset() |
Puts iterator in a state in which hasNext() returns false.
|
protected final ISpecies[] species
protected Box box
protected int nextCursor
protected final MoleculeArrayList next
protected final boolean oneIterate
public MoleculeIteratorAll(ISpecies[] species)
public MoleculeIteratorAll(ISpecies[] species, boolean oneIterate)
species - species for which molecules are returned as iterates. Only
species[0] is relevant, and must not be null.public void setBox(Box newBox)
setBox in interface MoleculesetIteratorBoxDependentpublic void setTarget(IMolecule newTargetAtom)
setTarget in interface MoleculesetIteratorTargetablepublic void setDirection(IteratorDirective.Direction newDirection)
setDirection in interface AtomsetIteratorDirectablepublic void reset()
AtomsetIteratorreset in interface AtomsetIteratorpublic void unset()
AtomsetIteratorunset in interface AtomsetIteratorpublic IMoleculeList next()
MoleculesetIteratornext in interface MoleculesetIteratorpublic int nBody()
AtomsetIteratornBody in interface AtomsetIteratorpublic int size()
size in interface AtomsetIterator