Package org.apache.poi.hssf.model
Class RecordStream
- java.lang.Object
-
- org.apache.poi.hssf.model.RecordStream
-
public final class RecordStream extends Object
Simplifies iteration over a sequence ofRecord
objects.
-
-
Constructor Summary
Constructors Constructor Description RecordStream(List<Record> records, int startIx)
RecordStream(List<Record> inputList, int startIndex, int endIx)
Creates a RecordStream bounded by startIndex and endIndex
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCountRead()
Record
getNext()
boolean
hasNext()
Class<? extends Record>
peekNextClass()
Record
peekNextRecord()
int
peekNextSid()
-
-
-
Constructor Detail
-
RecordStream
public RecordStream(List<Record> inputList, int startIndex, int endIx)
Creates a RecordStream bounded by startIndex and endIndex- Parameters:
inputList
- the list to iterate overstartIndex
- the start index within the listendIx
- the end index within the list, which is the index of the end element + 1
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
getNext
public Record getNext()
-
peekNextClass
public Class<? extends Record> peekNextClass()
- Returns:
- the
Class
of the next Record.null
if this stream is exhausted.
-
peekNextRecord
public Record peekNextRecord()
- Returns:
- the next Record.
null
if this stream is exhausted.
-
peekNextSid
public int peekNextSid()
- Returns:
- -1 if at end of records
-
getCountRead
public int getCountRead()
-
-