Record Class CellRef

java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.CellRef
Record Components:
sheetIndex - the 0-based sheet index in the workbook
row - the 0-based row index
column - the 0-based column index

public record CellRef(int sheetIndex, int row, int column) extends Record
A workbook-wide cell coordinate: a 0-based sheet index plus 0-based row and column. Returned by formula-tracing calls (Workbook.precedents(io.keikai.axyra.sheets.Sheet, int, int), Workbook.dependents(io.keikai.axyra.sheets.Sheet, int, int), Workbook.allDependents(io.keikai.axyra.sheets.Sheet, int, int)), which may cross sheet boundaries.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CellRef(int sheetIndex, int row, int column)
    Creates an instance of a CellRef record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    a1()
    Returns the A1 reference within its sheet, e.g.
    int
    Returns the value of the column record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    row()
    Returns the value of the row record component.
    int
    Returns the value of the sheetIndex record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • CellRef

      public CellRef(int sheetIndex, int row, int column)
      Creates an instance of a CellRef record class.
      Parameters:
      sheetIndex - the value for the sheetIndex record component
      row - the value for the row record component
      column - the value for the column record component
  • Method Details

    • a1

      public String a1()
      Returns the A1 reference within its sheet, e.g. "C4", without a sheet name or $ markers.
    • 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. All components in this record class 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.
    • sheetIndex

      public int sheetIndex()
      Returns the value of the sheetIndex record component.
      Returns:
      the value of the sheetIndex record component
    • row

      public int row()
      Returns the value of the row record component.
      Returns:
      the value of the row record component
    • column

      public int column()
      Returns the value of the column record component.
      Returns:
      the value of the column record component