etomica.atom.iterator
Class AtomIteratorLeafAtoms

java.lang.Object
  extended by etomica.atom.iterator.AtomIteratorArrayListSimple
      extended by etomica.atom.iterator.AtomIteratorLeafAtoms
All Implemented Interfaces:
AtomIterator, AtomIteratorBoxDependent, AtomLeafsetIterator, AtomsetIterator, AtomsetIteratorBoxDependent, Serializable
Direct Known Subclasses:
AtomIteratorLeafFilteredType

public class AtomIteratorLeafAtoms
extends AtomIteratorArrayListSimple
implements AtomIteratorBoxDependent

Iterator that will loop over all leaf atoms in a box. Can be configured to iterate all leaf atoms, or only those of a particular species.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class etomica.atom.iterator.AtomIteratorArrayListSimple
atomSetSinglet, cursor, list
 
Constructor Summary
AtomIteratorLeafAtoms()
          Creates iterator with no box specified.
AtomIteratorLeafAtoms(IBox box)
          Creates iterator conditioned to give all leaf atoms of the specified box.
 
Method Summary
 void setBox(IBox box)
          Configures iterator to form its iterates from the leaf atoms of the given box.
 
Methods inherited from class etomica.atom.iterator.AtomIteratorArrayListSimple
nBody, next, nextAtom, reset, setList, size, unset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface etomica.atom.iterator.AtomIterator
nextAtom
 
Methods inherited from interface etomica.atom.iterator.AtomLeafsetIterator
next
 
Methods inherited from interface etomica.atom.iterator.AtomsetIterator
nBody, reset, size, unset
 

Constructor Detail

AtomIteratorLeafAtoms

public AtomIteratorLeafAtoms()
Creates iterator with no box specified. Iteration will return no atoms until a call to setBox is performed.


AtomIteratorLeafAtoms

public AtomIteratorLeafAtoms(IBox box)
Creates iterator conditioned to give all leaf atoms of the specified box. Call to reset() is required before beginning iteration.

Method Detail

setBox

public void setBox(IBox box)
Configures iterator to form its iterates from the leaf atoms of the given box. If a species was previously (or subsequently) set, iterates will be the leaf atoms of under the species in the specified box.

Specified by:
setBox in interface AtomsetIteratorBoxDependent
Throws:
a - NullPointerException if the Box is null