etomica.atom.iterator
Class AtomIteratorNull

java.lang.Object
  extended by etomica.atom.iterator.AtomIteratorNull
All Implemented Interfaces:
AtomIterator, AtomLeafsetIterator, AtomsetIterator, Serializable

public final class AtomIteratorNull
extends Object
implements AtomIterator, Serializable

Static iterator that returns no atoms.

See Also:
Serialized Form

Field Summary
static AtomIteratorNull INSTANCE
           
 
Method Summary
 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 next atom in the iteration sequence, or null if hasNext() is false.
 void reset()
          Resets the iterator to loop through its iterates again.
 int size()
          The number of iterates returned by this iterator in its current state.
 void unset()
          Puts iterator in a state in which hasNext() returns false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final AtomIteratorNull INSTANCE
Method Detail

next

public IAtomList next()
Description copied from interface: AtomLeafsetIterator
Returns the next AtomSet iterate, or null if hasNext() is false.

Specified by:
next in interface AtomLeafsetIterator

nextAtom

public IAtom nextAtom()
Description copied from interface: AtomIterator
Returns the next atom in the iteration sequence, or null if hasNext() is false.

Specified by:
nextAtom in interface AtomIterator

reset

public void reset()
Description copied from interface: AtomsetIterator
Resets the iterator to loop through its iterates again.

Specified by:
reset in interface AtomsetIterator

size

public int size()
Description copied from interface: AtomsetIterator
The number of iterates returned by this iterator in its current state.

Specified by:
size in interface AtomsetIterator

unset

public void unset()
Description copied from interface: AtomsetIterator
Puts iterator in a state in which hasNext() returns false.

Specified by:
unset in interface AtomsetIterator

nBody

public int nBody()
Description copied from interface: AtomsetIterator
Returns the number of atoms given in each iterate, i.e., the size of the atom array returned with each call to next().

Specified by:
nBody in interface AtomsetIterator
Returns: