|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectetomica.nbr.cell.AtomIteratorCell
public class AtomIteratorCell
Returns occupants of all cells as iterates.
| Field Summary | |
|---|---|
protected AtomSetSinglet |
atomSetSinglet
|
| Constructor Summary | |
|---|---|
AtomIteratorCell(int D,
BoxAgentManager agentManager)
Constructor makes iterator that must have box specified and then be reset() before iteration. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
|
int |
nBody()
Returns 1, indicating that this is an atom iterator. |
IAtomList |
next()
Returns the next AtomSet iterate, or null if hasNext() is false. |
IAtom |
nextAtom()
Returns the next atom in the iteration sequence, or null if hasNext() is false. |
void |
reset()
Resets the iterator to loop through its iterates again. |
void |
setBox(IBox box)
|
int |
size()
Returns the number of atoms the iterator will return if reset and iterated in its present state. |
void |
unset()
Puts iterator in a state in which hasNext() returns false. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final AtomSetSinglet atomSetSinglet
| Constructor Detail |
|---|
public AtomIteratorCell(int D,
BoxAgentManager agentManager)
D - the dimension of the space of the simulation (used to
construct cell iterators)| Method Detail |
|---|
public void setBox(IBox box)
public int size()
size in interface AtomsetIteratorpublic boolean hasNext()
public final IAtomList next()
AtomLeafsetIterator
next in interface AtomLeafsetIteratorpublic IAtom nextAtom()
AtomIterator
nextAtom in interface AtomIteratorpublic void unset()
AtomsetIterator
unset in interface AtomsetIteratorpublic int nBody()
nBody in interface AtomsetIteratorpublic void reset()
AtomsetIterator
reset in interface AtomsetIterator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||