Class AbstractSpreadSheetToMatrix<T>

    • Field Detail

      • m_Rows

        protected Range m_Rows
        the range of rows to operate on.
    • Constructor Detail

      • AbstractSpreadSheetToMatrix

        public AbstractSpreadSheetToMatrix()
    • Method Detail

      • setRows

        public void setRows​(Range value)
        Sets the range of rows to use.
        Parameters:
        value - the rows
      • getRows

        public Range getRows()
        Returns the range of rows to use.
        Returns:
        the rows
      • rowsTipText

        public String rowsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setColumns

        public void setColumns​(SpreadSheetColumnRange value)
        Sets the range of columns to use.
        Parameters:
        value - the columns
      • getColumns

        public SpreadSheetColumnRange getColumns()
        Returns the range of columns to use.
        Returns:
        the columns
      • columnsTipText

        public String columnsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • includeColumn

        protected abstract boolean includeColumn​(SpreadSheet sheet,
                                                 int col)
        Determines whether to include this particular column.
        Parameters:
        sheet - the spreadsheet to work on
        col - the column to check
        Returns:
        true if to include in the matrix
      • newMatrix

        protected abstract T[][] newMatrix​(int rows,
                                           int cols)
        Generates a new matrix.
        Parameters:
        rows - the number of rows
        cols - the number of columns
      • determineColumns

        protected int[] determineColumns​(SpreadSheet sheet)
        Determines all the columns to include in the matrix.
        Parameters:
        sheet - the spreadsheet to process
        Returns:
        the indices (0-based)
      • getValue

        protected abstract T getValue​(SpreadSheet sheet,
                                      Row row,
                                      int col)
        Returns the cell value at the specified location.
        Parameters:
        sheet - the sheet to process
        row - the row to work on
        col - the column index in the row
        Returns:
        the cell value