AtomIterator, AtomIteratorAtomDependent, AtomLeafsetIterator, AtomsetIterator, java.io.Serializablepublic final class AtomIteratorSinglet extends java.lang.Object implements AtomIteratorAtomDependent, java.io.Serializable
| Modifier and Type | Field | Description |
|---|---|---|
protected AtomSetSinglet |
atomSetSinglet |
| Constructor | Description |
|---|---|
AtomIteratorSinglet() |
Constructs iterator without defining atom.
|
AtomIteratorSinglet(IAtom a) |
Constructs iterator specifying that it return the given atom.
|
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
protected final AtomSetSinglet atomSetSinglet
public AtomIteratorSinglet()
public AtomIteratorSinglet(IAtom a)
a - The atom that will be returned by this iterator upon reset.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()
AtomLeafsetIteratornext in interface AtomLeafsetIteratorpublic final int nBody()
AtomsetIteratornBody in interface AtomsetIterator