public class SpreadsheetCache
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SpreadsheetCache.CellValues
Represents the values of a cell in a spreadsheet.
|
static class |
SpreadsheetCache.SheetValues
This class represents the cached values of a sheet in a spreadsheet.
|
static class |
SpreadsheetCache.SpreadsheetContext
The SpreadsheetContext class represents the context of a spreadsheet,
including the active sheet and active cell coordinates.
|
static class |
SpreadsheetCache.Sync
The Sync class represents the data to be synchronized in a spreadsheet.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
CACHE_INDEX_CELL_EDIT_TEXT
The index of the cell edit text in the array of cached cell values
|
static int |
CACHE_INDEX_CELL_FMT_TEXT
The index of the cell formatted text in the array of cached cell values
|
static int |
CACHE_INDEX_CELL_TYPE
The index of the cell data type value in the array of cached cell values
|
static int |
CACHE_INDEX_CELL_VALUE
The index of the cell value in the array of cached cell values
|
private java.util.HashMap<java.lang.Integer,CellValuesStorage> |
cachedValues
The cachedValues variable is a HashMap that stores CellValuesStorage objects.
|
private SpreadsheetCache.SpreadsheetContext |
context
Represents some cached spreadsheet context data.
|
static int |
MAX_COLS_TOCACHE
The maximum number of columns to cache.
|
static int |
MAX_ROWS_TOCACHE
The maximum number of rows to cache.
|
static java.lang.Object |
NO_VALUE
Represents a special value used to indicate that a cell is not stored in the cache.
|
static int |
NUM_VALUES_PER_CELL
Represents the number of values stored in each cell of the cached cell data.
|
| Constructor and Description |
|---|
SpreadsheetCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
cacheValues(SpreadsheetCache.Sync cacheData)
Stores the values from the given Sync object.
|
int[] |
getActiveCell()
Returns the active cell coordinates of the spreadsheet.
|
int |
getActiveSheet()
Returns the index of the active sheet in the spreadsheet.
|
java.lang.Object |
getCachedCellValue(int sheet,
int row,
int col,
int valIdx)
Retrieves the cached cell value at the specified sheet, row, column, and value index.
|
java.lang.Integer |
getLastColumn()
Returns the last visible column of the current sheet.
|
java.lang.Integer |
getLastRow()
Returns the last visible column of the current sheet.
|
public static final int CACHE_INDEX_CELL_TYPE
public static final int CACHE_INDEX_CELL_VALUE
public static final int CACHE_INDEX_CELL_EDIT_TEXT
public static final int CACHE_INDEX_CELL_FMT_TEXT
public static final java.lang.Object NO_VALUE
public static final int NUM_VALUES_PER_CELL
public static final int MAX_COLS_TOCACHE
public static final int MAX_ROWS_TOCACHE
private java.util.HashMap<java.lang.Integer,CellValuesStorage> cachedValues
private SpreadsheetCache.SpreadsheetContext context
public int getActiveSheet()
public int[] getActiveCell()
public java.lang.Object getCachedCellValue(int sheet,
int row,
int col,
int valIdx)
sheet - The sheet index of the cellrow - The row index of the cellcol - The column index of the cellvalIdx - The index of the value within the cellNO_VALUE means the requested
cell is not stored.public java.lang.Integer getLastColumn()
public java.lang.Integer getLastRow()
public void cacheValues(SpreadsheetCache.Sync cacheData)
cacheData - The Sync object containing the values to be cached.