The Octet Molecular Representation Framework v0.8.2

net.sf.octet.collection
Interface AtomicSymbolIterator


public interface AtomicSymbolIterator

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

 
 AtomicSymbolCollection symbols = ...
 AtomicSymbolIterator it = symbols.iterateAtomicSymbols();
 
 while (it.hasNext())
 {
   AtomicSymbol symbol = it.nextAtomicSymbol();
 }
 
 

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

Method Summary
 boolean hasNext()
          Returns true if the iterator has another AtomicSymbol.
 AtomicSymbol nextAtom()
          Returns the next AtomicSymbol.
 

Method Detail

hasNext

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

Returns:
true if another AtomicSymbol is available, false otherwise

nextAtom

public AtomicSymbol nextAtom()
Returns the next AtomicSymbol.

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

The Octet Molecular Representation Framework v0.8.2