Package io.github.ai4ci.config.inhost
Class ImmutablePhenomenologicalModel.Builder
java.lang.Object
io.github.ai4ci.config.inhost.ImmutablePhenomenologicalModel.Builder
- Enclosing class:
- ImmutablePhenomenologicalModel
Builds instances of type
ImmutablePhenomenologicalModel
.
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 newImmutablePhenomenologicalModel
.from
(PhenomenologicalModel instance) Fill a builder with attribute values from the providedPhenomenologicalModel
instance.setApproxPeakImmuneResponse
(Abstraction.Distribution approxPeakImmuneResponse) Initializes the value for theapproxPeakImmuneResponse
attribute.setApproxPeakViralLoad
(Abstraction.Distribution approxPeakViralLoad) Initializes the value for theapproxPeakViralLoad
attribute.setImmuneWaningHalfLife
(Abstraction.Distribution immuneWaningHalfLife) Initializes the value for theimmuneWaningHalfLife
attribute.setIncubationPeriod
(Abstraction.Distribution incubationPeriod) Initializes the value for theincubationPeriod
attribute.setIncubationToPeakViralLoadDelay
(Abstraction.Distribution incubationToPeakViralLoadDelay) Initializes the value for theincubationToPeakViralLoadDelay
attribute.setInfectiousnessCutoff
(Double infectiousnessCutoff) Initializes the value for theinfectiousnessCutoff
attribute.setPeakImmuneResponseDelay
(Abstraction.Distribution peakImmuneResponseDelay) Initializes the value for thepeakImmuneResponseDelay
attribute.setPeakToRecoveryDelay
(Abstraction.Distribution peakToRecoveryDelay) Initializes the value for thepeakToRecoveryDelay
attribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutablePhenomenologicalModel.Builder from(PhenomenologicalModel instance) Fill a builder with attribute values from the providedPhenomenologicalModel
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
-
setInfectiousnessCutoff
@CanIgnoreReturnValue public final ImmutablePhenomenologicalModel.Builder setInfectiousnessCutoff(Double infectiousnessCutoff) Initializes the value for theinfectiousnessCutoff
attribute.- Parameters:
infectiousnessCutoff
- The value for infectiousnessCutoff- Returns:
this
builder for use in a chained invocation
-
setIncubationPeriod
@CanIgnoreReturnValue public final ImmutablePhenomenologicalModel.Builder setIncubationPeriod(Abstraction.Distribution incubationPeriod) Initializes the value for theincubationPeriod
attribute.- Parameters:
incubationPeriod
- The value for incubationPeriod- Returns:
this
builder for use in a chained invocation
-
setApproxPeakViralLoad
@CanIgnoreReturnValue public final ImmutablePhenomenologicalModel.Builder setApproxPeakViralLoad(Abstraction.Distribution approxPeakViralLoad) Initializes the value for theapproxPeakViralLoad
attribute.- Parameters:
approxPeakViralLoad
- The value for approxPeakViralLoad- Returns:
this
builder for use in a chained invocation
-
setIncubationToPeakViralLoadDelay
@CanIgnoreReturnValue public final ImmutablePhenomenologicalModel.Builder setIncubationToPeakViralLoadDelay(Abstraction.Distribution incubationToPeakViralLoadDelay) Initializes the value for theincubationToPeakViralLoadDelay
attribute.- Parameters:
incubationToPeakViralLoadDelay
- The value for incubationToPeakViralLoadDelay- Returns:
this
builder for use in a chained invocation
-
setPeakToRecoveryDelay
@CanIgnoreReturnValue public final ImmutablePhenomenologicalModel.Builder setPeakToRecoveryDelay(Abstraction.Distribution peakToRecoveryDelay) Initializes the value for thepeakToRecoveryDelay
attribute.- Parameters:
peakToRecoveryDelay
- The value for peakToRecoveryDelay- Returns:
this
builder for use in a chained invocation
-
setApproxPeakImmuneResponse
@CanIgnoreReturnValue public final ImmutablePhenomenologicalModel.Builder setApproxPeakImmuneResponse(Abstraction.Distribution approxPeakImmuneResponse) Initializes the value for theapproxPeakImmuneResponse
attribute.- Parameters:
approxPeakImmuneResponse
- The value for approxPeakImmuneResponse- Returns:
this
builder for use in a chained invocation
-
setPeakImmuneResponseDelay
@CanIgnoreReturnValue public final ImmutablePhenomenologicalModel.Builder setPeakImmuneResponseDelay(Abstraction.Distribution peakImmuneResponseDelay) Initializes the value for thepeakImmuneResponseDelay
attribute.- Parameters:
peakImmuneResponseDelay
- The value for peakImmuneResponseDelay- Returns:
this
builder for use in a chained invocation
-
setImmuneWaningHalfLife
@CanIgnoreReturnValue public final ImmutablePhenomenologicalModel.Builder setImmuneWaningHalfLife(Abstraction.Distribution immuneWaningHalfLife) Initializes the value for theimmuneWaningHalfLife
attribute.- Parameters:
immuneWaningHalfLife
- The value for immuneWaningHalfLife- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutablePhenomenologicalModel
.- Returns:
- An immutable instance of PhenomenologicalModel
- Throws:
IllegalStateException
- if any required attributes are missing
-