AtomsetIterator
, AtomsetIteratorDirectable
, MoleculesetIterator
, MoleculesetIteratorBoxDependent
, MoleculesetIteratorPDT
, MoleculesetIteratorTargetable
, java.io.Serializable
public 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 MoleculesetIteratorBoxDependent
public void setTarget(IMolecule newTargetAtom)
setTarget
in interface MoleculesetIteratorTargetable
public void setDirection(IteratorDirective.Direction newDirection)
setDirection
in interface AtomsetIteratorDirectable
public void reset()
AtomsetIterator
reset
in interface AtomsetIterator
public void unset()
AtomsetIterator
unset
in interface AtomsetIterator
public IMoleculeList next()
MoleculesetIterator
next
in interface MoleculesetIterator
public int nBody()
AtomsetIterator
nBody
in interface AtomsetIterator
public int size()
size
in interface AtomsetIterator