|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectetomica.atom.iterator.AtomIteratorSinglet
public final class AtomIteratorSinglet
Iterator that expires after returning a single atom, which is specified by a call to the setAtom method, or via the constructor. Subsequent calls to reset() and next() will return the specified atom, until another is specified via setAtom.
| Field Summary | |
|---|---|
protected AtomSetSinglet |
atomSetSinglet
|
| Constructor Summary | |
|---|---|
AtomIteratorSinglet()
Constructs iterator without defining atom. |
|
AtomIteratorSinglet(IAtom a)
Constructs iterator specifying that it return the given atom. |
|
| Method Summary | |
|---|---|
IAtom |
getAtom()
|
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(). |
IAtomList |
next()
Returns the next AtomSet iterate, or null if hasNext() is false. |
IAtom |
nextAtom()
Returns the iterator's atom and unsets iterator. |
void |
reset()
Resets iterator to a state where hasNext is true. |
void |
setAtom(IAtom a)
Defines atom returned by iterator and leaves iterator unset. |
int |
size()
returns 1 if atom is not null, 0 if atom is null. |
void |
unset()
Sets iterator to a state where 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 AtomIteratorSinglet()
public AtomIteratorSinglet(IAtom a)
a - The atom that will be returned by this iterator upon reset.| Method Detail |
|---|
public void setAtom(IAtom a)
setAtom in interface AtomIteratorAtomDependentpublic IAtom getAtom()
public int size()
size in interface AtomsetIteratorpublic void unset()
unset in interface AtomsetIteratorpublic void reset()
reset in interface AtomsetIteratorpublic IAtom nextAtom()
nextAtom in interface AtomIteratorpublic IAtomList next()
AtomLeafsetIterator
next in interface AtomLeafsetIteratorpublic final int nBody()
AtomsetIterator
nBody in interface AtomsetIterator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||