AtomLeafsetIterator, AtomsetIterator, AtomsetIteratorBoxDependent, AtomsetIteratorDirectable, AtomsetIteratorPDT, AtomsetIteratorTargetable, java.io.Serializablepublic class Api1ASite extends java.lang.Object implements AtomsetIteratorPDT, java.io.Serializable
| Modifier and Type | Field | Description |
|---|---|---|
protected boolean[] |
periodicity |
| Constructor | Description |
|---|---|
Api1ASite(int D,
BoxAgentManager agentManager) |
Constructor makes iterator that must have box specified and then be
reset() before iteration.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
nBody() |
Returns 2, indicating that this is a pair iterator.
|
IAtomList |
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 box) |
Sets the Box to pull iterates from
|
void |
setDirection(IteratorDirective.Direction direction) |
Indicates allowed direction for iteration, relative to specified target
atom.
|
void |
setTarget(IAtom newTargetAtom) |
Sets the target molecule with which all pairs are formed.
|
int |
size() |
Returns the number of atom pairs the iterator will return if
reset and iterated in its present state.
|
void |
unset() |
Puts iterator in a state in which hasNext() returns false.
|
public Api1ASite(int D,
BoxAgentManager agentManager)
D - the dimension of the space of the simulation (used to construct cell iterators)public void setBox(Box box)
AtomsetIteratorBoxDependentsetBox in interface AtomsetIteratorBoxDependentpublic int size()
size in interface AtomsetIteratorpublic IAtomList next()
AtomLeafsetIteratornext in interface AtomLeafsetIteratorpublic void unset()
AtomsetIteratorunset in interface AtomsetIteratorpublic int nBody()
nBody in interface AtomsetIteratorpublic void reset()
AtomsetIteratorreset in interface AtomsetIteratorpublic void setDirection(IteratorDirective.Direction direction)
setDirection in interface AtomsetIteratorDirectablepublic void setTarget(IAtom newTargetAtom)
setTarget in interface AtomsetIteratorTargetable