public class CellValuesStorage
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Object[] |
cellValues
Represents an array of cell values used to store information in a spreadsheet.
|
private int |
cols
Represents the number of the stored columns.
|
private int |
rows
Represents the number of the stored rows.
|
| Constructor and Description |
|---|
CellValuesStorage() |
| Modifier and Type | Method and Description |
|---|---|
private int |
calcCachedValueIndex(int row,
int col,
int valueIndex)
Calculates the index of the cached value in the cell area based on the row, column, and value index.
|
void |
ensureCellAreaSize(int rows,
int cols,
boolean shrink)
Ensures that the cell area has the specified number of rows and columns.
|
java.lang.Object |
getCachedCellValue(int row,
int col,
int valueIndex)
Retrieves the cached cell value at the specified row, column, and value index.
|
void |
storeCellValues(SpreadsheetCache.SheetValues sheetValues)
Stores the cell values in the provided SheetValues object into the cell area.
|
private int rows
private int cols
private java.lang.Object[] cellValues
public void ensureCellAreaSize(int rows,
int cols,
boolean shrink)
rows - The number of rows in the cell areacols - The number of columns in the cell areashrink - Specifies whether to shrink the cell area if necessarypublic void storeCellValues(SpreadsheetCache.SheetValues sheetValues)
sheetValues - The SheetValues object containing the cell values to storepublic java.lang.Object getCachedCellValue(int row,
int col,
int valueIndex)
row - The row index of the cellcol - The column index of the cellvalueIndex - The index of the value within the cellSpreadsheetCache.NO_VALUE means the requested
cell is not stored.private int calcCachedValueIndex(int row,
int col,
int valueIndex)
row - The row index of the cell.col - The column index of the cell.valueIndex - The index of the value within the cell.