|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectetomica.atom.iterator.AtomIteratorArrayListSimple
public class AtomIteratorArrayListSimple
An atom iterator of the elements from an AtomArrayList (in proper sequence). Iterator will fail if element are added to or removed from list while iteration is proceeding.
| Field Summary | |
|---|---|
protected AtomSetSinglet |
atomSetSinglet
|
protected int |
cursor
Index of element to be returned by subsequent call to next. |
protected IAtomList |
list
|
| Constructor Summary | |
|---|---|
AtomIteratorArrayListSimple()
Constructs new iterator with an empty list. |
|
AtomIteratorArrayListSimple(IAtomList atomList)
Constructs new iterator set to iterate given list (upon reset). |
|
| Method Summary | |
|---|---|
int |
nBody()
Returns 1, indicating that this is an atom iterator. |
IAtomList |
next()
Same as nextAtom(). |
IAtom |
nextAtom()
Returns the next iterate and advances the iterator. |
void |
reset()
Puts iterator in state ready to begin iteration. |
void |
setList(IAtomList atomList)
Sets the list for iteration. |
int |
size()
Returns the number of iterates that would be given by this iterator if reset with the current list. |
void |
unset()
Puts iterator in state in which hasNext is false. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int cursor
protected IAtomList list
protected final AtomSetSinglet atomSetSinglet
| Constructor Detail |
|---|
public AtomIteratorArrayListSimple()
public AtomIteratorArrayListSimple(IAtomList atomList)
| Method Detail |
|---|
public void setList(IAtomList atomList)
public int nBody()
nBody in interface AtomsetIteratorpublic void unset()
unset in interface AtomsetIteratorpublic IAtom nextAtom()
nextAtom in interface AtomIteratorpublic IAtomList next()
next in interface AtomLeafsetIteratorpublic int size()
size in interface AtomsetIteratorpublic void reset()
reset in interface AtomsetIterator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||