Package adams.data.io.input
Class RowWiseSpreadSheetSpectrumReader.SingleSheetIterator
- java.lang.Object
-
- adams.data.io.input.RowWiseSpreadSheetSpectrumReader.SheetIterator
-
- adams.data.io.input.RowWiseSpreadSheetSpectrumReader.SingleSheetIterator
-
- All Implemented Interfaces:
Iterator<adams.data.spreadsheet.SpreadSheet>
- Enclosing class:
- RowWiseSpreadSheetSpectrumReader
public static class RowWiseSpreadSheetSpectrumReader.SingleSheetIterator extends RowWiseSpreadSheetSpectrumReader.SheetIterator
Iterator for single-sheet readers.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<adams.data.spreadsheet.SpreadSheet>m_Sheetsthe list of sheets.-
Fields inherited from class adams.data.io.input.RowWiseSpreadSheetSpectrumReader.SheetIterator
m_Input, m_Reader
-
-
Constructor Summary
Constructors Constructor Description SingleSheetIterator(adams.data.io.input.SpreadSheetReader reader, File input)Initializes the iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Returnstrueif the iteration has more elements.adams.data.spreadsheet.SpreadSheetnext()Returns the next element in the iteration.protected List<adams.data.spreadsheet.SpreadSheet>sheet()Reads the sheets if necessary and returns them.-
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
-
-
-
-
Field Detail
-
m_Sheets
protected List<adams.data.spreadsheet.SpreadSheet> m_Sheets
the list of sheets.
-
-
Constructor Detail
-
SingleSheetIterator
public SingleSheetIterator(adams.data.io.input.SpreadSheetReader reader, File input)Initializes the iterator.- Parameters:
reader- the reader to useinput- the file to read from
-
-
Method Detail
-
sheet
protected List<adams.data.spreadsheet.SpreadSheet> sheet()
Reads the sheets if necessary and returns them.- Returns:
- the sheets to iterate over
-
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
-
-