peakml
Class PeakDataIterator<gPeak extends Peak>

java.lang.Object
  extended by peakml.PeakDataIterator<gPeak>
All Implemented Interfaces:
java.util.Iterator<gPeak>

public class PeakDataIterator<gPeak extends Peak>
extends java.lang.Object
implements java.util.Iterator<gPeak>

An iterator for peak-data, allowing for sequential access to Peak data stored in a PeakData instance. It uses the Centroid or Profile implementations for access to the different elements of a data point.


Method Summary
 boolean hasNext()
          Returns true when there are still more elements in the PeakData instance to be traversed.
 gPeak next()
          Returns the current Peak instance and moves the iterator one step further.
 void remove()
          This function has not been implemented and throws a RuntimeException on invocation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasNext

public boolean hasNext()
Returns true when there are still more elements in the PeakData instance to be traversed.

Specified by:
hasNext in interface java.util.Iterator<gPeak extends Peak>
Returns:
True when there are still more elements.

next

public gPeak next()
Returns the current Peak instance and moves the iterator one step further.

Specified by:
next in interface java.util.Iterator<gPeak extends Peak>
Returns:
The next Peak instance.

remove

public void remove()
This function has not been implemented and throws a RuntimeException on invocation.

Specified by:
remove in interface java.util.Iterator<gPeak extends Peak>