Package io.keikai.axyra.sheets
Record Class CellValue.Array
java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.CellValue.Array
- Record Components:
rows- the rows, row-major; stored as given, not copied
- All Implemented Interfaces:
CellValue
- Enclosing interface:
- CellValue
A rectangular, row-major matrix of scalar values (
rows[r][c]).
Produced for a range (area) argument handed to a
TypedUserFunction: the engine
evaluates an area reference to a two-dimensional array of its cell
values, and that shape crosses the bridge as-is. A typed UDF may also
return one to produce an array result. Elements are always scalar
variants (never nested Array); a single cell cannot
hold an array, so this variant is rejected when writing cell values.
Unlike the scalar record variants, equality is by matrix content
(Arrays.deepEquals), not array identity.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.keikai.axyra.sheets.CellValue
CellValue.Array, CellValue.Blank, CellValue.Bool, CellValue.Error, CellValue.Number, CellValue.Text -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcolCount()Returns the number of columns, taken from the first row; 0 for an empty matrix.booleanIndicates whether some other object is "equal to" this one.get(int row, int col) Returns the value at(row, col), both 0-based.inthashCode()Returns a hash code value for this object.introwCount()Returns the number of rows.CellValue[][]rows()Returns the value of therowsrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Array
Creates an instance of aArrayrecord class.- Parameters:
rows- the value for therowsrecord component
-
-
Method Details
-
rowCount
public int rowCount()Returns the number of rows. -
colCount
public int colCount()Returns the number of columns, taken from the first row; 0 for an empty matrix. -
get
Returns the value at(row, col), both 0-based.- Throws:
ArrayIndexOutOfBoundsException- if the position is outside the matrix
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
rows
Returns the value of therowsrecord component.- Returns:
- the value of the
rowsrecord component
-