Record Class Table

java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.content.Table

public record Table(String name, int firstRow, int firstColumn, int lastRow, int lastColumn, List<String> columns, int headerRowCount, boolean totalsRowShown, TableStyleInfo style, List<TableColumn> tableColumns) extends Record
A table (ListObject): a named rectangular region with header columns (ECMA-376 §18.5.1.2). Coordinates are 0-based inclusive; when totalsRowShown is true the totals row is the last row of the range. columns keeps the plain header names; tableColumns carries the per-column totals-row configuration.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Table(String name, int firstRow, int firstColumn, int lastRow, int lastColumn, List<String> columns, int headerRowCount, boolean totalsRowShown, TableStyleInfo style, List<TableColumn> tableColumns)
    Creates an instance of a Table record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the columns record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the firstColumn record component.
    int
    Returns the value of the firstRow record component.
    static Table
    Parse the engine's table-info JSON.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the headerRowCount record component.
    int
    Returns the value of the lastColumn record component.
    int
    Returns the value of the lastRow record component.
    Returns the value of the name record component.
    Returns the value of the style record component.
    Returns the value of the tableColumns record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the totalsRowShown record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Table

      public Table(String name, int firstRow, int firstColumn, int lastRow, int lastColumn, List<String> columns, int headerRowCount, boolean totalsRowShown, TableStyleInfo style, List<TableColumn> tableColumns)
      Creates an instance of a Table record class.
      Parameters:
      name - the value for the name record component
      firstRow - the value for the firstRow record component
      firstColumn - the value for the firstColumn record component
      lastRow - the value for the lastRow record component
      lastColumn - the value for the lastColumn record component
      columns - the value for the columns record component
      headerRowCount - the value for the headerRowCount record component
      totalsRowShown - the value for the totalsRowShown record component
      style - the value for the style record component
      tableColumns - the value for the tableColumns record component
  • Method Details

    • fromJson

      public static Table fromJson(String json)
      Parse the engine's table-info JSON. Not part of the public API.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • firstRow

      public int firstRow()
      Returns the value of the firstRow record component.
      Returns:
      the value of the firstRow record component
    • firstColumn

      public int firstColumn()
      Returns the value of the firstColumn record component.
      Returns:
      the value of the firstColumn record component
    • lastRow

      public int lastRow()
      Returns the value of the lastRow record component.
      Returns:
      the value of the lastRow record component
    • lastColumn

      public int lastColumn()
      Returns the value of the lastColumn record component.
      Returns:
      the value of the lastColumn record component
    • columns

      public List<String> columns()
      Returns the value of the columns record component.
      Returns:
      the value of the columns record component
    • headerRowCount

      public int headerRowCount()
      Returns the value of the headerRowCount record component.
      Returns:
      the value of the headerRowCount record component
    • totalsRowShown

      public boolean totalsRowShown()
      Returns the value of the totalsRowShown record component.
      Returns:
      the value of the totalsRowShown record component
    • style

      public TableStyleInfo style()
      Returns the value of the style record component.
      Returns:
      the value of the style record component
    • tableColumns

      public List<TableColumn> tableColumns()
      Returns the value of the tableColumns record component.
      Returns:
      the value of the tableColumns record component