AtomLeafsetIterator, AtomsetIterator, AtomsetIteratorBasisDependent, AtomsetIteratorTargetablepublic class ApiIndexList extends java.lang.Object implements AtomsetIteratorBasisDependent
| Modifier and Type | Field | Description |
|---|---|---|
protected int |
cursor |
|
protected int[][] |
index |
|
protected AtomPair |
pair |
|
protected IMolecule |
parentGroup |
|
protected int[][][] |
partners |
|
protected IAtom |
target |
| Constructor | Description |
|---|---|
ApiIndexList(int[][] index) |
Constructs iterator without defining atoms in pair.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
basisSize() |
Indicates the size of the basis needed to set the iterator.
|
boolean |
haveTarget(IAtom a) |
Returns true if the iterator with its current basis
would return an iterate for the given target.
|
int |
nBody() |
Returns 2, indicating that this is a pair iterator.
|
IAtomList |
next() |
Returns the iterator's pair and unsets iterator.
|
void |
reset() |
Resets iterator to a state where hasNext is true, if atoms in pair are
not null.
|
void |
setBasis(IMoleculeList parent) |
Identifies the atoms that form the basis for iteration, such that
the childList atoms of those given will form the iterates.
|
void |
setTarget(IAtom a) |
|
int |
size() |
The number of iterates returned by this iterator in its current state.
|
void |
unset() |
Sets iterator to a state where hasNext() returns false.
|
protected final int[][] index
protected final int[][][] partners
protected int cursor
protected IMolecule parentGroup
protected IAtom target
protected final AtomPair pair
public ApiIndexList(int[][] index)
public int basisSize()
AtomsetIteratorBasisDependentbasisSize in interface AtomsetIteratorBasisDependentpublic boolean haveTarget(IAtom a)
AtomsetIteratorBasisDependenthaveTarget in interface AtomsetIteratorBasisDependentpublic void setTarget(IAtom a)
setTarget in interface AtomsetIteratorTargetablepublic void setBasis(IMoleculeList parent)
AtomsetIteratorBasisDependentsetBasis in interface AtomsetIteratorBasisDependentparent - The basis atoms; a null basis will
condition the iterator to give no iterates until a valid basis
is specified via another call to this method.public int size()
AtomsetIteratorsize in interface AtomsetIteratorpublic void unset()
unset in interface AtomsetIteratorpublic void reset()
reset in interface AtomsetIteratorpublic IAtomList next()
next in interface AtomLeafsetIteratorpublic final int nBody()
nBody in interface AtomsetIterator