Package io.github.ai4ci.config
Class ImmutableTestParameters
java.lang.Object
io.github.ai4ci.config.ImmutableTestParameters
- All Implemented Interfaces:
TestParameters
,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableTestParameters
extends Object
implements TestParameters
Immutable implementation of
TestParameters
.
Use the builder to create immutable instances:
ImmutableTestParameters.builder()
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableTestParameters
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableTestParameters
.static ImmutableTestParameters
copyOf
(TestParameters instance) Creates an immutable copy of aTestParameters
value.boolean
This instance is equal to all instances ofImmutableTestParameters
that have equal attribute values.The average delay in the result becoming available (days)The SD of the delay in the result.Identifier for the test type e.g.int
hashCode()
Computes a hash code from attributes:testName
,sensitivity
,specificity
,meanTestDelay
,sdTestDelay
,limitOfDetection
.Creates a builder forImmutableTestParameters
.prefilled with attibute values ofthis
instance to easily create modified copies.toString()
Prints the immutable valueTestParameters
with attribute values.final ImmutableTestParameters
withLimitOfDetection
(Double value) Copy the current immutable object by setting a value for thelimitOfDetection
attribute.final ImmutableTestParameters
withMeanTestDelay
(Double value) Copy the current immutable object by setting a value for themeanTestDelay
attribute.final ImmutableTestParameters
withSdTestDelay
(Double value) Copy the current immutable object by setting a value for thesdTestDelay
attribute.final ImmutableTestParameters
withSensitivity
(Double value) Copy the current immutable object by setting a value for thesensitivity
attribute.final ImmutableTestParameters
withSpecificity
(Double value) Copy the current immutable object by setting a value for thespecificity
attribute.final ImmutableTestParameters
withTestName
(String value) Copy the current immutable object by setting a value for thetestName
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.ai4ci.config.TestParameters
applyNoise, negativeLikelihoodRatio, positiveLikelihoodRatio
-
Method Details
-
getTestName
Identifier for the test type e.g. LFT, PCR, SYMPTOMS- Specified by:
getTestName
in interfaceTestParameters
-
getSensitivity
- Specified by:
getSensitivity
in interfaceTestParameters
- Returns:
- The value of the
sensitivity
attribute
-
getSpecificity
- Specified by:
getSpecificity
in interfaceTestParameters
- Returns:
- The value of the
specificity
attribute
-
getMeanTestDelay
The average delay in the result becoming available (days)- Specified by:
getMeanTestDelay
in interfaceTestParameters
-
getSdTestDelay
The SD of the delay in the result. This will be a log normal- Specified by:
getSdTestDelay
in interfaceTestParameters
-
getLimitOfDetection
- Specified by:
getLimitOfDetection
in interfaceTestParameters
- Returns:
- The value of the
limitOfDetection
attribute
-
withTestName
Copy the current immutable object by setting a value for thetestName
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for testName- Returns:
- A modified copy of the
this
object
-
withSensitivity
Copy the current immutable object by setting a value for thesensitivity
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for sensitivity- Returns:
- A modified copy of the
this
object
-
withSpecificity
Copy the current immutable object by setting a value for thespecificity
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for specificity- Returns:
- A modified copy of the
this
object
-
withMeanTestDelay
Copy the current immutable object by setting a value for themeanTestDelay
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for meanTestDelay- Returns:
- A modified copy of the
this
object
-
withSdTestDelay
Copy the current immutable object by setting a value for thesdTestDelay
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for sdTestDelay- Returns:
- A modified copy of the
this
object
-
withLimitOfDetection
Copy the current immutable object by setting a value for thelimitOfDetection
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for limitOfDetection- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableTestParameters
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:testName
,sensitivity
,specificity
,meanTestDelay
,sdTestDelay
,limitOfDetection
. -
toString
Prints the immutable valueTestParameters
with attribute values. -
copyOf
Creates an immutable copy of aTestParameters
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable TestParameters instance
-
toBuilder
Creates a builder forImmutableTestParameters
.prefilled with attibute values ofthis
instance to easily create modified copies.- Returns:
- A new ImmutableTestParameters builder with attributes of
this
instance
-
builder
Creates a builder forImmutableTestParameters
.ImmutableTestParameters.builder() .setTestName(String) // required
testName
.setSensitivity(Double) // requiredsensitivity
.setSpecificity(Double) // requiredspecificity
.setMeanTestDelay(Double) // requiredmeanTestDelay
.setSdTestDelay(Double) // requiredsdTestDelay
.setLimitOfDetection(Double) // requiredlimitOfDetection
.build();- Returns:
- A new ImmutableTestParameters builder
-