Class MgfFileIterator
java.lang.Object
com.compomics.util.experiment.io.mass_spectrometry.mgf.MgfFileIterator
- All Implemented Interfaces:
MsFileIterator,AutoCloseable
An iterator of the spectra in an mgf file.
- Author:
- Marc Vaudel, Harald Barsnes
-
Constructor Details
-
MgfFileIterator
Constructor.- Parameters:
mgfFile- the file to go throughwaitingHandler- the waiting handler
-
-
Method Details
-
next
Description copied from interface:MsFileIteratorReturns the title of the next spectrum, null if none.- Specified by:
nextin interfaceMsFileIterator- Returns:
- The title of the next spectrum.
-
getSpectrum
Description copied from interface:MsFileIteratorReturns the spectrum corresponding to the title returned by the last call to the next() method.- Specified by:
getSpectrumin interfaceMsFileIterator- Returns:
- The spectrum corresponding to the title returned by the last call to the next() method.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceMsFileIterator
-