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.SpreadSheet
m_Chunk
the 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.SpreadSheet
chunk()
Reads the next chunk if necessary.boolean
hasNext()
Returnstrue
if the iteration has more elements.adams.data.spreadsheet.SpreadSheet
next()
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()
Returnstrue
if the iteration has more elements. (In other words, returnstrue
ifnext()
would return an element rather than throwing an exception.)- Returns:
true
if 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
-
-