The Octet Molecular Representation Framework v0.8.2

net.sf.octet.collection
Interface ElectronIterator


public interface ElectronIterator

An iterator for an ElectronCollection. The code fragment below illustrates a typical use:

 
 ElectronCollection electrons = ...
 ElectronIterator it = electrons.iterateElectrons();
 
 while (it.hasNext())
 {
   Electron electron = it.nextElectron();
 }
 
 

Author:
Richard Apodaca
See Also:
"Iterator Pattern [GoF95]"

Method Summary
 boolean hasNext()
          Returns true if the iterator has another Electron.
 Electron nextElectron()
          Returns the next Electron.
 

Method Detail

hasNext

public boolean hasNext()
Returns true if the iterator has another Electron.

Returns:
true if another Electron is available, false otherwise

nextElectron

public Electron nextElectron()
Returns the next Electron.

Returns:
the next Electron
Throws:
NoSuchElementException - if this iterator has no more elements

The Octet Molecular Representation Framework v0.8.2