Package adams.data.io.input
Class RowWiseSpreadSheetSpectrumReader.ChunkedSheetIterator
- java.lang.Object
-
- adams.data.io.input.RowWiseSpreadSheetSpectrumReader.SheetIterator
-
- adams.data.io.input.RowWiseSpreadSheetSpectrumReader.ChunkedSheetIterator
-
- All Implemented Interfaces:
Iterator<adams.data.spreadsheet.SpreadSheet>
- Enclosing class:
- RowWiseSpreadSheetSpectrumReader
public static class RowWiseSpreadSheetSpectrumReader.ChunkedSheetIterator extends RowWiseSpreadSheetSpectrumReader.SheetIterator
Iterator for chunked spreadsheet readers.
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.data.spreadsheet.SpreadSheetm_Chunkthe next chunk.-
Fields inherited from class adams.data.io.input.RowWiseSpreadSheetSpectrumReader.SheetIterator
m_Input, m_Reader
-
-
Constructor Summary
Constructors Constructor Description ChunkedSheetIterator(adams.data.io.input.ChunkedSpreadSheetReader reader, File input)Initializes the iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected adams.data.spreadsheet.SpreadSheetchunk()Reads the next chunk if necessary.booleanhasNext()Returnstrueif the iteration has more elements.adams.data.spreadsheet.SpreadSheetnext()Returns the next element in the iteration.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
ChunkedSheetIterator
public ChunkedSheetIterator(adams.data.io.input.ChunkedSpreadSheetReader reader, File input)Initializes the iterator.- Parameters:
reader- the reader to useinput- the file to read from
-
-
Method Detail
-
chunk
protected adams.data.spreadsheet.SpreadSheet chunk()
Reads the next chunk if necessary.- Returns:
- the next chunk, null if none available
-
hasNext
public boolean hasNext()
Returnstrueif the iteration has more elements. (In other words, returnstrueifnext()would return an element rather than throwing an exception.)- Returns:
trueif the iteration has more elements
-
next
public adams.data.spreadsheet.SpreadSheet next()
Returns the next element in the iteration.- Returns:
- the next element in the iteration
- Throws:
NoSuchElementException- if the iteration has no more elements
-
-