Class AbstractRowScore

    • Field Detail

      • m_LastError

        protected String m_LastError
        the last error that was generated.
    • Constructor Detail

      • AbstractRowScore

        public AbstractRowScore()
    • Method Detail

      • hasLastError

        public boolean hasLastError()
        Checks whether there was an error with the last stats generation.
        Specified by:
        hasLastError in interface ErrorProvider
        Returns:
        true if there was an error
        See Also:
        getLastError()
      • getLastError

        public String getLastError()
        Returns the last error that occurred.
        Specified by:
        getLastError in interface ErrorProvider
        Returns:
        the last error, null if none occurred
      • getNumScores

        public abstract int getNumScores()
        Returns how many score values will get generated.
        Returns:
        the number of scores
      • check

        protected String check​(SpreadSheet sheet,
                               int rowIndex)
        Checks whether the spreadsheet can be handled.
        Parameters:
        sheet - the spreadsheet to check
        rowIndex - the row index
        Returns:
        null if everythin ok, otherwise error message
      • doCalculateScore

        protected abstract Double[] doCalculateScore​(SpreadSheet sheet,
                                                     int rowIndex)
        Performs the actual calculation of the row score(s).
        Parameters:
        sheet - the spreadsheet to generate the score for
        rowIndex - the row index
        Returns:
        the generated score(s), null in case of an error
      • calculateScore

        public Double[] calculateScore​(SpreadSheet sheet,
                                       int rowIndex)
        Performs the calculation of the row score(s).
        Parameters:
        sheet - the spreadsheet to generate the score for
        rowIndex - the row index
        Returns:
        the generated score(s), null in case of an error