Package io.keikai.axyra.sheets
Interface CellValue
- All Known Implementing Classes:
CellValue.Array,CellValue.Blank,CellValue.Bool,CellValue.Error,CellValue.Number,CellValue.Text
public sealed interface CellValue
permits CellValue.Number, CellValue.Text, CellValue.Bool, CellValue.Error, CellValue.Blank, CellValue.Array
A single cell's value — a short-lived, immutable marshalling object.
CellValue instances are produced when reading a Range or
Sheet.value(int, int) and consumed when writing. They are not
persistent per-cell state (the engine remains the single source of truth), so
they do not violate the "no object-per-cell" principle: a bulk read produces
them in one pass from the primitive arrays that crossed JNI once.
A formula error (e.g. #DIV/0!) is data, carried by
CellValue.Error — it is never thrown as an exception.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA rectangular, row-major matrix of scalar values (rows[r][c]).static final recordThe empty cell value.static final recordA boolean cell value.static final recordAn error cell value, identified by its ExcelERROR.TYPEcode (mirrors the engine'sFormulaError::code).static final recordA numeric cell value.static final recordA text cell value. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CellValue.BlankShared singleton for empty cells.static final CellValue.BoolShared singleton forFALSE.static final CellValue.BoolShared singleton forTRUE. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic CellValueA row-major matrix value (seeCellValue.Array) — the shape of a range argument to a typed user-defined function, or of an array result returned from one.static CellValueblank()The empty-cell singleton.static CellValuebool(boolean value) A boolean value (returns a cached singleton).static CellValueerror(int code) An error value from its ExcelERROR.TYPEcode (1–14).static StringerrorString(int code) Maps an ExcelERROR.TYPEcode to its display string.static CellValuenumber(double value) A numeric value (Excel stores integers and decimals both asf64).static CellValueA text value.
-
Field Details
-
BLANK
Shared singleton for empty cells. -
TRUE
Shared singleton forTRUE. -
FALSE
Shared singleton forFALSE.
-
-
Method Details
-
number
A numeric value (Excel stores integers and decimals both asf64). -
text
A text value. -
bool
A boolean value (returns a cached singleton). -
error
An error value from its ExcelERROR.TYPEcode (1–14). -
blank
The empty-cell singleton. -
array
A row-major matrix value (seeCellValue.Array) — the shape of a range argument to a typed user-defined function, or of an array result returned from one. Not writable to a single cell. -
errorString
Maps an ExcelERROR.TYPEcode to its display string. Mirror of the engine'sFormulaError::from_code; unknown codes fall back to#VALUE!.
-