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

public final Class ValueRecordsAggregate

extends Object
implements Iterable<CellValueRecordInterface>
Class Inheritance
All Implemented Interfaces
java.lang.Iterable
Imports
java.util.Iterator, .NoSuchElementException, .Spliterator, .Spliterators, org.apache.poi.hssf.model.RecordStream, org.apache.poi.hssf.record.BlankRecord, .CellValueRecordInterface, .FormulaRecord, .MulBlankRecord, .Record, .RecordBase, .StringRecord, org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor, org.apache.poi.ss.formula.FormulaShifter, org.apache.poi.ss.formula.ptg.Ptg

Aggregate value records together. Things are easier to handle that way.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
ValueRecordsAggregate.ValueIterator

iterator for CellValueRecordInterface

Field Summary

Modifier and TypeField and Description
private int
private static final int
private int
private static final int
private CellValueRecordInterface[][]

Constructor Summary

AccessConstructor and Description
public
ValueRecordsAggregate()

Creates a new instance of ValueRecordsAggregate

private
ValueRecordsAggregate(int firstCellIx, int lastCellIx, CellValueRecordInterface[][] pRecords)

Method Summary

Modifier and TypeMethod and Description
public void
public void
construct(CellValueRecordInterface rec, RecordStream rs, SharedValueManager
used to resolve any shared-formulas/arrays/tables for the current sheet
sfh
)

Processes a single cell value record

private static int

Returns:

the number of consecutive BlankRecords in the specified row starting from startIx.
countBlanks
(CellValueRecordInterface[] rowCellValues, int startIx)

private MulBlankRecord
createMBR(CellValueRecordInterface[] cellValues, int startIx, int nBlank)

public int
public int
public int
public int
getRowCellBlockSize(int startRow, int endRow)

Tallies a count of the size of the cell records that are attached to the rows in the range specified.

private static int
public void
public Iterator<CellValueRecordInterface>
iterator()

Implements java.lang.Iterable.iterator.

value iterator

public void
public void
public boolean
rowHasCells(int row)

Returns true if the row has cells attached to it

public Spliterator<CellValueRecordInterface>
spliterator()

Overrides default java.lang.Iterable.spliterator.

value spliterator

public void
updateFormulasAfterRowShift(FormulaShifter shifter, int currentExternSheetIndex)

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

firstcellback to summary
private int firstcell
INDEX_NOT_SETback to summary
private static final int INDEX_NOT_SET
lastcellback to summary
private int lastcell
MAX_ROW_INDEXback to summary
private static final int MAX_ROW_INDEX
recordsback to summary
private CellValueRecordInterface[][] records

Constructor Detail

ValueRecordsAggregateback to summary
public ValueRecordsAggregate()

Creates a new instance of ValueRecordsAggregate

ValueRecordsAggregateback to summary
private ValueRecordsAggregate(int firstCellIx, int lastCellIx, CellValueRecordInterface[][] pRecords)

Method Detail

addMultipleBlanksback to summary
public void addMultipleBlanks(MulBlankRecord mbr)
constructback to summary
public void construct(CellValueRecordInterface rec, RecordStream rs, SharedValueManager sfh)

Processes a single cell value record

Parameters
sfh:SharedValueManager

used to resolve any shared-formulas/arrays/tables for the current sheet

countBlanksback to summary
private static int countBlanks(CellValueRecordInterface[] rowCellValues, int startIx)
Returns:int

the number of consecutive BlankRecords in the specified row starting from startIx.

createMBRback to summary
private MulBlankRecord createMBR(CellValueRecordInterface[] cellValues, int startIx, int nBlank)
getFirstCellNumback to summary
public int getFirstCellNum()
getLastCellNumback to summary
public int getLastCellNum()
getPhysicalNumberOfCellsback to summary
public int getPhysicalNumberOfCells()
getRowCellBlockSizeback to summary
public int getRowCellBlockSize(int startRow, int endRow)

Tallies a count of the size of the cell records that are attached to the rows in the range specified.

getRowSerializedSizeback to summary
private static int getRowSerializedSize(CellValueRecordInterface[] rowCells)
insertCellback to summary
public void insertCell(CellValueRecordInterface cell)
iteratorback to summary
public Iterator<CellValueRecordInterface> iterator()

Implements java.lang.Iterable.iterator.

value iterator

Returns:Iterator<CellValueRecordInterface>

Doc from java.lang.Iterable.iterator.

an Iterator.

removeAllCellsValuesForRowback to summary
public void removeAllCellsValuesForRow(int rowIndex)
removeCellback to summary
public void removeCell(CellValueRecordInterface cell)
rowHasCellsback to summary
public boolean rowHasCells(int row)

Returns true if the row has cells attached to it

spliteratorback to summary
public Spliterator<CellValueRecordInterface> spliterator()

Overrides default java.lang.Iterable.spliterator.

value spliterator

Returns:Spliterator<CellValueRecordInterface>

Doc from java.lang.Iterable.spliterator.

a Spliterator over the elements described by this Iterable.

Annotations
@Override
Since
POI 5.2.0
updateFormulasAfterRowShiftback to summary
public void updateFormulasAfterRowShift(FormulaShifter shifter, int currentExternSheetIndex)
visitCellsForRowback to summary
public void visitCellsForRow(int rowIndex, RecordAggregate.RecordVisitor rv)
org.apache.poi.hssf.record.aggregates back to summary

pack-priv Class ValueRecordsAggregate.ValueIterator

extends Object
implements Iterator<CellValueRecordInterface>
Class Inheritance
  • java.lang.Object
  • org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.ValueIterator
All Implemented Interfaces
java.util.Iterator

iterator for CellValueRecordInterface

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv int
pack-priv int
pack-priv int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

public CellValueRecordInterface
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

curColIndexback to summary
pack-priv int curColIndex
curRowIndexback to summary
pack-priv int curRowIndex
nextColIndexback to summary
pack-priv int nextColIndex
nextRowIndexback to summary
pack-priv int nextRowIndex

Constructor Detail

ValueIteratorback to summary
public ValueIterator()

Method Detail

getNextPosback to summary
pack-priv void getNextPos()
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

nextback to summary
public CellValueRecordInterface next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:CellValueRecordInterface

the next element in the iteration

removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.