The Octet Molecular Representation Framework v0.8.2

net.sf.octet.collection
Interface AtomPairIterator


public interface AtomPairIterator

An AtomPairIterator provides a mechanism to iterate over an AtomPairCollection. Typical usage is illustrated in the following code fragment:

 
 AtomPairCollection pairs = ...
 AtomPairIterator it = pairs.iterateAtomPairs();
 
 while (it.hasNext())
 {
   AtomPair pair = it.nextAtomPair();
 }
 
 

Author:
Richard Apodaca
See Also:
"Iterator Pattern (GoF95)"

Method Summary
 boolean hasNext()
          Returns true if another AtomPair is available for iteration.
 AtomPair nextAtomPair()
          Returns the next AtomPair.
 

Method Detail

hasNext

public boolean hasNext()
Returns true if another AtomPair is available for iteration.

Returns:
true if another Atom will be iterated; false otherwise

nextAtomPair

public AtomPair nextAtomPair()
Returns the next AtomPair. Returns null if no AtomPair can be iterated.

Returns:
the next AtomPair.
Throws:
NoSuchElementException - if this iterator has no more AtomPairs

The Octet Molecular Representation Framework v0.8.2