Class AbstractSimpleSampleTest

    • Constructor Detail

      • AbstractSimpleSampleTest

        protected AbstractSimpleSampleTest​(String name,
                                           String description,
                                           String columnName)
        Constructor that set the field of this abstract test.
        Parameters:
        name - name of the test
        description - description of the test
        columnName - column name of the test
      • AbstractSimpleSampleTest

        protected AbstractSimpleSampleTest​(String name,
                                           String description,
                                           String columnName,
                                           String unit)
        Constructor that set the field of this abstract test.
        Parameters:
        name - name of the test
        description - description of the test
        columnName - column name of the test
        unit - unit of the test
    • Method Detail

      • getKey

        protected abstract String getKey​(int pooledSampleId)
        Get the the key in the RunData object for the value to test.
        Parameters:
        pooledSampleId - the pooled sample Id
        Returns:
        a String with the required key
      • transformValue

        protected Number transformValue​(Number value,
                                        RunData data)
        Transform the value.
        Parameters:
        value - value to transform
        data - run data
        Returns:
        the transformed value
      • isValuePercent

        protected boolean isValuePercent()
        Test if the value is a percent.
        Returns:
        true if the value is a percent
      • getValueType

        protected abstract Class<?> getValueType()
        Get the type of the value.
        Returns:
        a Class object with the type
      • test

        public TestResult test​(RunData data,
                               int pooledSampleId)
        Description copied from interface: PooledSampleTest
        Do a test.
        Parameters:
        data - result object
        pooledSampleId - pooled sample Id
        Returns:
        a TestResult object with the result of the test
      • testIndexedRead

        protected boolean testIndexedRead()
        Test if indexed read test must return a score >=0.
        Returns:
        if indexed read must return a score