AtomIterator
, AtomIteratorAtomDependent
, AtomLeafsetIterator
, AtomsetIterator
, java.io.Serializable
public 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 AtomIteratorAtomDependent
public IAtom getAtom()
public int size()
size
in interface AtomsetIterator
public void unset()
unset
in interface AtomsetIterator
public void reset()
reset
in interface AtomsetIterator
public IAtom nextAtom()
nextAtom
in interface AtomIterator
public IAtomList next()
AtomLeafsetIterator
next
in interface AtomLeafsetIterator
public final int nBody()
AtomsetIterator
nBody
in interface AtomsetIterator