java.lang.Object
io.github.tonywasher.joceanus.prometheus.service.sheet.PrometheusSheetView

public class PrometheusSheetView extends Object
Represents a view of a range of cells.
  • Constructor Details

  • Method Details

    • getSheet

      public PrometheusSheetSheet getSheet()
      Obtain the underlying sheet.
      Returns:
      the underlying sheet
    • getBaseCell

      public PrometheusSheetCellPosition getBaseCell()
      Obtain the top left position.
      Returns:
      the top left position
    • getRowCount

      public int getRowCount()
      Determine number of rows in this view.
      Returns:
      the number of rows.
    • getColumnCount

      public int getColumnCount()
      Determine number of columns in this view.
      Returns:
      the number of columns.
    • convertRowIndex

      protected int convertRowIndex(int pRowIndex)
      Convert Row index.
      Parameters:
      pRowIndex - the view index
      Returns:
      the sheet index or -1 if outside view
    • getRowByIndex

      public PrometheusSheetRow getRowByIndex(int pRowIndex)
      Obtain the row at required index.
      Parameters:
      pRowIndex - the requested row index
      Returns:
      the requested row.
    • getCellByPosition

      public PrometheusSheetCell getCellByPosition(int pColumnIndex, int pRowIndex)
      Obtain the cell at required position.
      Parameters:
      pColumnIndex - the requested column index
      pRowIndex - the requested row index
      Returns:
      the requested cell.
    • getCellByPosition

      public PrometheusSheetCell getCellByPosition(PrometheusSheetCellPosition pPosition)
      Obtain the cell at required position.
      Parameters:
      pPosition - the requested position
      Returns:
      the requested cell.
    • getRowCellByIndex

      public PrometheusSheetCell getRowCellByIndex(PrometheusSheetRow pRow, int pIndex)
      Obtain the cell at required index.
      Parameters:
      pRow - the row to extract from
      pIndex - the requested index
      Returns:
      the requested cell.
    • cellIterator

      Obtain a cell iterator for non-empty cells in the view and in the row.
      Parameters:
      pRow - the row
      Returns:
      the iterator
    • rowIterator

      public ListIterator<PrometheusSheetRow> rowIterator()
      Obtain a row iterator for non-empty rows in this view.
      Returns:
      the iterator