Class ImmutableTestParameters.Builder

java.lang.Object
io.github.ai4ci.config.ImmutableTestParameters.Builder
Enclosing class:
ImmutableTestParameters

@NotThreadSafe public static final class ImmutableTestParameters.Builder extends Object
Builds instances of type ImmutableTestParameters. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      @CanIgnoreReturnValue public final ImmutableTestParameters.Builder from(TestParameters instance)
      Fill a builder with attribute values from the provided TestParameters instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setTestName

      @CanIgnoreReturnValue public final ImmutableTestParameters.Builder setTestName(String testName)
      Initializes the value for the testName attribute.
      Parameters:
      testName - The value for testName
      Returns:
      this builder for use in a chained invocation
    • setSensitivity

      @CanIgnoreReturnValue public final ImmutableTestParameters.Builder setSensitivity(Double sensitivity)
      Initializes the value for the sensitivity attribute.
      Parameters:
      sensitivity - The value for sensitivity
      Returns:
      this builder for use in a chained invocation
    • setSpecificity

      @CanIgnoreReturnValue public final ImmutableTestParameters.Builder setSpecificity(Double specificity)
      Initializes the value for the specificity attribute.
      Parameters:
      specificity - The value for specificity
      Returns:
      this builder for use in a chained invocation
    • setMeanTestDelay

      @CanIgnoreReturnValue public final ImmutableTestParameters.Builder setMeanTestDelay(Double meanTestDelay)
      Initializes the value for the meanTestDelay attribute.
      Parameters:
      meanTestDelay - The value for meanTestDelay
      Returns:
      this builder for use in a chained invocation
    • setSdTestDelay

      @CanIgnoreReturnValue public final ImmutableTestParameters.Builder setSdTestDelay(Double sdTestDelay)
      Initializes the value for the sdTestDelay attribute.
      Parameters:
      sdTestDelay - The value for sdTestDelay
      Returns:
      this builder for use in a chained invocation
    • setLimitOfDetection

      @CanIgnoreReturnValue public final ImmutableTestParameters.Builder setLimitOfDetection(Double limitOfDetection)
      Initializes the value for the limitOfDetection attribute.
      Parameters:
      limitOfDetection - The value for limitOfDetection
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableTestParameters build()
      Returns:
      An immutable instance of TestParameters
      Throws:
      IllegalStateException - if any required attributes are missing