|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectetomica.atom.iterator.ApiIntergroup
public class ApiIntergroup
Iterator that returns pairs formed using two different basis atoms, so that the iterates are taken from two different groups.
| Field Summary | |
|---|---|
protected AtomIteratorBasis |
aiInner
|
protected AtomIteratorBasis |
aiOuter
|
protected MoleculeSetSinglet |
atomSetSinglet
|
protected boolean |
needSetupIterators
|
protected AtomPair |
pair
|
protected IAtom |
targetAtom
|
| Constructor Summary | |
|---|---|
ApiIntergroup()
Default iterator is an ApiInnerFixed formed from two AtomIteratorBasis instances. |
|
ApiIntergroup(AtomIteratorBasis outer,
AtomIteratorBasis inner)
Constructs a pair iterator that returns iterates from the given pairIterator, which is expected to contain two basis-dependent iterators. |
|
| Method Summary | |
|---|---|
int |
basisSize()
Returns 2, indicating that the setBasis method expects an array of two atoms. |
AtomIteratorBasis |
getInnerIterator()
Accessor method for the inner-loop atom iterator. |
AtomIteratorBasis |
getOuterIterator()
Accessor method for the outer-loop atom iterator. |
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 pair of atoms. |
void |
reset()
Resets the iterator to loop through its iterates again. |
void |
setBasis(IMoleculeList basisAtoms)
Specifies the basis, which identifies the atoms subject to iteration. |
void |
setTarget(IAtom newTargetAtom)
Specifies a target atom, which should appear in all iterates. |
protected void |
setupIterators()
|
int |
size()
Returns the number of pairs given by this iterator. |
void |
unset()
Sets the iterator such that hasNext is false. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final AtomPair pair
protected final AtomIteratorBasis aiInner
protected final AtomIteratorBasis aiOuter
protected IAtom targetAtom
protected boolean needSetupIterators
protected final MoleculeSetSinglet atomSetSinglet
| Constructor Detail |
|---|
public ApiIntergroup()
public ApiIntergroup(AtomIteratorBasis outer,
AtomIteratorBasis inner)
| Method Detail |
|---|
public AtomIteratorBasis getOuterIterator()
public AtomIteratorBasis getInnerIterator()
public void unset()
unset in interface AtomsetIteratorpublic int size()
size in interface AtomsetIteratorpublic final int nBody()
AtomsetIterator
nBody in interface AtomsetIteratorpublic IAtomList next()
next in interface AtomLeafsetIteratorpublic void setTarget(IAtom newTargetAtom)
setTarget in interface AtomsetIteratorTargetablepublic boolean haveTarget(IAtom target)
AtomsetIteratorBasisDependent
haveTarget in interface AtomsetIteratorBasisDependentprotected void setupIterators()
public void setBasis(IMoleculeList basisAtoms)
setBasis in interface AtomsetIteratorBasisDependentbasisAtoms - 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 reset()
AtomsetIterator
reset in interface AtomsetIteratorpublic int basisSize()
basisSize in interface AtomsetIteratorBasisDependent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||