AtomLeafsetIterator
, AtomsetIterator
, AtomsetIteratorBasisDependent
, AtomsetIteratorDirectable
, AtomsetIteratorTargetable
, java.io.Serializable
public final class ApiIntragroup extends java.lang.Object implements AtomsetIteratorBasisDependent, AtomsetIteratorDirectable, java.io.Serializable
Constructor | Description |
---|---|
ApiIntragroup() |
Constructor makes iterator that must have basis specified and then be
reset() before iteration.
|
ApiIntragroup(AtomIteratorAtomDependent aiInnerUp,
AtomIteratorAtomDependent aiInnerDn) |
|
ApiIntragroup(AtomsetIteratorBasisDependent aiOuter,
AtomIteratorAtomDependent aiInnerUp,
AtomIteratorAtomDependent aiInnerDn) |
Modifier and Type | Method | Description |
---|---|---|
int |
basisSize() |
Returns 1, indicating the the array given to the setBasis method
should have only one element.
|
boolean |
haveTarget(IAtom target) |
Returns true if the iterator with its current basis
would return an iterate for the given target.
|
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.
|
void |
reset() |
Puts iterator in a state to begin iteration.
|
void |
setBasis(IMoleculeList atoms) |
Specifies the parent atom of the iterates.
|
void |
setDirection(IteratorDirective.Direction direction) |
Specifies the direction, which applies only if iterating pairs
with a target atom; otherwise, if all pairs from group are indicated,
direction is ignored.
|
void |
setTarget(IAtom newTargetAtom) |
|
int |
size() |
Returns the number of atom pairs the iterator will return if
reset and iterated in its present state.
|
void |
unset() |
Puts iterator in a state in which hasNext() returns false.
|
public ApiIntragroup()
public ApiIntragroup(AtomIteratorAtomDependent aiInnerUp, AtomIteratorAtomDependent aiInnerDn)
public ApiIntragroup(AtomsetIteratorBasisDependent aiOuter, AtomIteratorAtomDependent aiInnerUp, AtomIteratorAtomDependent aiInnerDn)
public int nBody()
AtomsetIterator
nBody
in interface AtomsetIterator
public void setTarget(IAtom newTargetAtom)
setTarget
in interface AtomsetIteratorTargetable
public boolean haveTarget(IAtom target)
AtomsetIteratorBasisDependent
haveTarget
in interface AtomsetIteratorBasisDependent
public void reset()
reset
in interface AtomsetIterator
public void unset()
AtomsetIterator
unset
in interface AtomsetIterator
public void setBasis(IMoleculeList atoms)
setBasis
in interface AtomsetIteratorBasisDependent
atoms
- 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 void setDirection(IteratorDirective.Direction direction)
setDirection
in interface AtomsetIteratorDirectable
public int size()
size
in interface AtomsetIterator
public IAtomList next()
AtomLeafsetIterator
next
in interface AtomLeafsetIterator
public int basisSize()
basisSize
in interface AtomsetIteratorBasisDependent