Package io.github.ai4ci.config
Class ImmutableTestParameters.Builder
java.lang.Object
io.github.ai4ci.config.ImmutableTestParameters.Builder
- Enclosing class:
- ImmutableTestParameters
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 Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newImmutableTestParameters
.from
(TestParameters instance) Fill a builder with attribute values from the providedTestParameters
instance.setLimitOfDetection
(Double limitOfDetection) Initializes the value for thelimitOfDetection
attribute.setMeanTestDelay
(Double meanTestDelay) Initializes the value for themeanTestDelay
attribute.setSdTestDelay
(Double sdTestDelay) Initializes the value for thesdTestDelay
attribute.setSensitivity
(Double sensitivity) Initializes the value for thesensitivity
attribute.setSpecificity
(Double specificity) Initializes the value for thespecificity
attribute.setTestName
(String testName) Initializes the value for thetestName
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedTestParameters
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
Initializes the value for thetestName
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 thesensitivity
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 thespecificity
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 themeanTestDelay
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 thesdTestDelay
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 thelimitOfDetection
attribute.- Parameters:
limitOfDetection
- The value for limitOfDetection- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableTestParameters
.- Returns:
- An immutable instance of TestParameters
- Throws:
IllegalStateException
- if any required attributes are missing
-