Top Fields Constructors Methods
org.apache.poi.hssf.record.aggregates

public final Class RowRecordsAggregate

extends RecordAggregate
Class Inheritance
Imports
java.util.ArrayList, .Iterator, .List, .Map, .Spliterator, .TreeMap, org.apache.poi.hssf.model.RecordStream, org.apache.poi.hssf.record.ArrayRecord, .CellValueRecordInterface, .ContinueRecord, .DBCellRecord, .DConRefRecord, .DimensionsRecord, .FormulaRecord, .HyperlinkRecord, .IndexRecord, .MergeCellsRecord, .MulBlankRecord, .Record, .RowRecord, .SharedFormulaRecord, .TableRecord, .UnknownRecord, org.apache.poi.ss.SpreadsheetVersion, org.apache.poi.ss.formula.FormulaShifter

Field Summary

Modifier and TypeField and Description
private int
private int
private final Map<Integer, RowRecord>
private RowRecord[]
private final SharedValueManager
private final List<Record>
private final ValueRecordsAggregate

Constructor Summary

AccessConstructor and Description
public
RowRecordsAggregate()

Creates a new instance of ValueRecordsAggregate

private
public
RowRecordsAggregate(RecordStream
record stream with all SharedFormulaRecord ArrayRecord, TableRecord MergeCellsRecord Records removed
rs
,
SharedValueManager
an initialised SharedValueManager (from the shared formula, array and table records of the current sheet). Never null.
svm
)

Method Summary

Modifier and TypeMethod and Description
private void
addUnknownRecord(Record rec)

Handles UnknownRecords which appear within the row/cell records

public void
collapseRow(int rowNumber)

public DimensionsRecord
public FormulaRecordAggregate
createFormula(int row, int col)

public IndexRecord
createIndexRecord(int indexRecordOffset, int sizeOfInitialSheetRecords)

public static RowRecord

Returns:

RowRecord created for the passed in row number
createRow
(int
row number
rowNumber
)

Create a row record.

public void
expandRow(int rowNumber)

public int
public int
public Iterator<CellValueRecordInterface>
getCellValueIterator()

Returns an iterator for the cell values

public Spliterator<CellValueRecordInterface>
getCellValueSpliterator()

Returns a spliterator for the cell values

private int
getEndRowNumberForBlock(int block)

Returns the physical row number of the end row in a block

public int
public Iterator<RowRecord>
public int
public int
public RowRecord
getRow(int rowIndex)

public int
getRowBlockCount()

Returns the number of row blocks.

private int
getRowBlockSize(int block)

public int
getRowCountForBlock(int block)

Returns the number of physical rows within a block

public Spliterator<RowRecord>
private int
getStartRowNumberForBlock(int block)

Returns the physical row number of the first row in a block

public void
public void
public boolean
public boolean
public void
public void
private static short[]
public void
updateFormulasAfterRowShift(FormulaShifter formulaShifter, int currentExternSheetIndex)

public void
visitContainedRecords(RecordAggregate.RecordVisitor
The visitor to use for callbacks while walking this object
rv
)

Implements abstract org.apache.poi.hssf.record.aggregates.RecordAggregate.visitContainedRecords.

Visit each of the atomic BIFF records contained in this RecordAggregate in the order that they should be written to file.

private int
private int

Returns:

index of the next row after the last row that gets hidden
writeHidden
(RowRecord pRowRecord, int row)

Hide all rows at or below the current outline level

Inherited from org.apache.poi.hssf.record.aggregates.RecordAggregate:
getRecordSizeserialize

Field Detail

_firstrowback to summary
private int _firstrow
_lastrowback to summary
private int _lastrow
_rowRecordsback to summary
private final Map<Integer, RowRecord> _rowRecords
_rowRecordValuesback to summary
private RowRecord[] _rowRecordValues
_sharedValueManagerback to summary
private final SharedValueManager _sharedValueManager
_unknownRecordsback to summary
private final List<Record> _unknownRecords
_valuesAggback to summary
private final ValueRecordsAggregate _valuesAgg

Constructor Detail

RowRecordsAggregateback to summary
public RowRecordsAggregate()

Creates a new instance of ValueRecordsAggregate

RowRecordsAggregateback to summary
private RowRecordsAggregate(SharedValueManager svm)
RowRecordsAggregateback to summary
public RowRecordsAggregate(RecordStream rs, SharedValueManager svm)
Parameters
rs:RecordStream

record stream with all SharedFormulaRecord ArrayRecord, TableRecord MergeCellsRecord Records removed

svm:SharedValueManager

an initialised SharedValueManager (from the shared formula, array and table records of the current sheet). Never null.

Method Detail

addUnknownRecordback to summary
private void addUnknownRecord(Record rec)

Handles UnknownRecords which appear within the row/cell records

collapseRowback to summary
public void collapseRow(int rowNumber)
createDimensionsback to summary
public DimensionsRecord createDimensions()
createFormulaback to summary
public FormulaRecordAggregate createFormula(int row, int col)
createIndexRecordback to summary
public IndexRecord createIndexRecord(int indexRecordOffset, int sizeOfInitialSheetRecords)
createRowback to summary
public static RowRecord createRow(int rowNumber)

Create a row record.

Parameters
rowNumber:int

row number

Returns:RowRecord

RowRecord created for the passed in row number

See Also
org.apache.poi.hssf.record.RowRecord
expandRowback to summary
public void expandRow(int rowNumber)
findEndOfRowOutlineGroupback to summary
public int findEndOfRowOutlineGroup(int row)
findStartOfRowOutlineGroupback to summary
public int findStartOfRowOutlineGroup(int row)
getCellValueIteratorback to summary
public Iterator<CellValueRecordInterface> getCellValueIterator()

Returns an iterator for the cell values

getCellValueSpliteratorback to summary
public Spliterator<CellValueRecordInterface> getCellValueSpliterator()

Returns a spliterator for the cell values

Since
POI 5.2.0
getEndRowNumberForBlockback to summary
private int getEndRowNumberForBlock(int block)

Returns the physical row number of the end row in a block

getFirstRowNumback to summary
public int getFirstRowNum()
getIteratorback to summary
public Iterator<RowRecord> getIterator()
getLastRowNumback to summary
public int getLastRowNum()
getPhysicalNumberOfRowsback to summary
public int getPhysicalNumberOfRows()
getRowback to summary
public RowRecord getRow(int rowIndex)
getRowBlockCountback to summary
public int getRowBlockCount()

Returns the number of row blocks.

The row blocks are goupings of rows that contain the DBCell record after them

getRowBlockSizeback to summary
private int getRowBlockSize(int block)
getRowCountForBlockback to summary
public int getRowCountForBlock(int block)

Returns the number of physical rows within a block

getSpliteratorback to summary
public Spliterator<RowRecord> getSpliterator()
Since
POI 5.2.0
getStartRowNumberForBlockback to summary
private int getStartRowNumberForBlock(int block)

Returns the physical row number of the first row in a block

insertCellback to summary
public void insertCell(CellValueRecordInterface cvRec)
insertRowback to summary
public void insertRow(RowRecord row)
isRowGroupCollapsedback to summary
public boolean isRowGroupCollapsed(int row)
isRowGroupHiddenByParentback to summary
public boolean isRowGroupHiddenByParent(int row)
removeCellback to summary
public void removeCell(CellValueRecordInterface cvRec)
removeRowback to summary
public void removeRow(RowRecord row)
shortListToArrayback to summary
private static short[] shortListToArray(List<Short> list)
updateFormulasAfterRowShiftback to summary
public void updateFormulasAfterRowShift(FormulaShifter formulaShifter, int currentExternSheetIndex)
visitContainedRecordsback to summary
public void visitContainedRecords(RecordAggregate.RecordVisitor rv)

Implements abstract org.apache.poi.hssf.record.aggregates.RecordAggregate.visitContainedRecords.

Doc from org.apache.poi.hssf.record.aggregates.RecordAggregate.visitContainedRecords.

Visit each of the atomic BIFF records contained in this RecordAggregate in the order that they should be written to file. Implementors may or may not return the actual Records being used to manage POI's internal implementation. Callers should not assume either way, and therefore only attempt to modify those Records after cloning

Parameters
rv:RecordAggregate.RecordVisitor

The visitor to use for callbacks while walking this object

Annotations
@Override
visitRowRecordsForBlockback to summary
private int visitRowRecordsForBlock(int blockIndex, RecordAggregate.RecordVisitor rv)
writeHiddenback to summary
private int writeHidden(RowRecord pRowRecord, int row)

Hide all rows at or below the current outline level

Returns:int

index of the next row after the last row that gets hidden