Top Description Fields Constructors Methods
org.apache.poi.hssf.model

public final Class RecordStream

extends Object
Class Inheritance
Imports
java.util.List, .NoSuchElementException, org.apache.poi.hssf.record.Record

Simplifies iteration over a sequence of Record objects.

Field Summary

Modifier and TypeField and Description
private int
private final int
private final List<Record>
private int

Constructor Summary

AccessConstructor and Description
public
RecordStream(List<Record>
the list to iterate over
inputList
,
int
the start index within the list
startIndex
,
int
the end index within the list, which is the index of the end element + 1
endIx
)

Creates a RecordStream bounded by startIndex and endIndex

public
RecordStream(List<Record> records, int startIx)

Method Summary

Modifier and TypeMethod and Description
public int
public Record
public boolean
public Class<? extends Record>

Returns:

the Class of the next Record. null if this stream is exhausted.
peekNextClass
()

public Record

Returns:

the next Record. null if this stream is exhausted.
peekNextRecord
()

public int

Returns:

-1 if at end of records
peekNextSid
()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_countReadback to summary
private int _countRead
_endIxback to summary
private final int _endIx
_listback to summary
private final List<Record> _list
_nextIndexback to summary
private int _nextIndex

Constructor Detail

RecordStreamback to summary
public RecordStream(List<Record> inputList, int startIndex, int endIx)

Creates a RecordStream bounded by startIndex and endIndex

Parameters
inputList:List<Record>

the list to iterate over

startIndex:int

the start index within the list

endIx:int

the end index within the list, which is the index of the end element + 1

RecordStreamback to summary
public RecordStream(List<Record> records, int startIx)

Method Detail

getCountReadback to summary
public int getCountRead()
getNextback to summary
public Record getNext()
hasNextback to summary
public boolean hasNext()
peekNextClassback to summary
public Class<? extends Record> peekNextClass()
Returns:Class<? extends Record>

the Class of the next Record. null if this stream is exhausted.

peekNextRecordback to summary
public Record peekNextRecord()
Returns:Record

the next Record. null if this stream is exhausted.

peekNextSidback to summary
public int peekNextSid()
Returns:int

-1 if at end of records