Package io.github.ai4ci.config
Class PartialDemographicAdjustment.Builder
java.lang.Object
io.github.ai4ci.config.PartialDemographicAdjustment.Builder
- Enclosing class:
- PartialDemographicAdjustment
Builds instances of type
PartialDemographicAdjustment
.
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 newPartialDemographicAdjustment
.Fill a builder with attribute values from the provided_PartialDemographicAdjustment
instance.setAppUseProbability
(Abstraction.SimpleFunction appUseProbability) Initializes the value for theappUseProbability
attribute.setAsymptomaticFraction
(Abstraction.SimpleFunction asymptomaticFraction) Initializes the value for theasymptomaticFraction
attribute.setCaseFatalityRate
(Abstraction.SimpleFunction caseFatalityRate) Initializes the value for thecaseFatalityRate
attribute.setCaseHospitalisationRate
(Abstraction.SimpleFunction caseHospitalisationRate) Initializes the value for thecaseHospitalisationRate
attribute.setComplianceProbability
(Abstraction.SimpleFunction complianceProbability) Initializes the value for thecomplianceProbability
attribute.setImmuneWaningHalfLife
(Abstraction.SimpleFunction immuneWaningHalfLife) Initializes the value for theimmuneWaningHalfLife
attribute.setIncubationPeriod
(Abstraction.SimpleFunction incubationPeriod) Initializes the value for theincubationPeriod
attribute.setInfectiousDuration
(Abstraction.SimpleFunction infectiousDuration) Initializes the value for theinfectiousDuration
attribute.setMaximumSocialContactReduction
(Abstraction.SimpleFunction maximumSocialContactReduction) Initializes the value for themaximumSocialContactReduction
attribute.setPeakToRecoveryDelay
(Abstraction.SimpleFunction peakToRecoveryDelay) Initializes the value for thepeakToRecoveryDelay
attribute.setSymptomDuration
(Abstraction.SimpleFunction symptomDuration) Initializes the value for thesymptomDuration
attribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final PartialDemographicAdjustment.Builder from(DemographicAdjustment._PartialDemographicAdjustment instance) Fill a builder with attribute values from the provided_PartialDemographicAdjustment
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
-
setAsymptomaticFraction
@CanIgnoreReturnValue public final PartialDemographicAdjustment.Builder setAsymptomaticFraction(Abstraction.SimpleFunction asymptomaticFraction) Initializes the value for theasymptomaticFraction
attribute.- Parameters:
asymptomaticFraction
- The value for asymptomaticFraction (can benull
)- Returns:
this
builder for use in a chained invocation
-
setCaseHospitalisationRate
@CanIgnoreReturnValue public final PartialDemographicAdjustment.Builder setCaseHospitalisationRate(Abstraction.SimpleFunction caseHospitalisationRate) Initializes the value for thecaseHospitalisationRate
attribute.- Parameters:
caseHospitalisationRate
- The value for caseHospitalisationRate (can benull
)- Returns:
this
builder for use in a chained invocation
-
setCaseFatalityRate
@CanIgnoreReturnValue public final PartialDemographicAdjustment.Builder setCaseFatalityRate(Abstraction.SimpleFunction caseFatalityRate) Initializes the value for thecaseFatalityRate
attribute.- Parameters:
caseFatalityRate
- The value for caseFatalityRate (can benull
)- Returns:
this
builder for use in a chained invocation
-
setComplianceProbability
@CanIgnoreReturnValue public final PartialDemographicAdjustment.Builder setComplianceProbability(Abstraction.SimpleFunction complianceProbability) Initializes the value for thecomplianceProbability
attribute.- Parameters:
complianceProbability
- The value for complianceProbability (can benull
)- Returns:
this
builder for use in a chained invocation
-
setAppUseProbability
@CanIgnoreReturnValue public final PartialDemographicAdjustment.Builder setAppUseProbability(Abstraction.SimpleFunction appUseProbability) Initializes the value for theappUseProbability
attribute.- Parameters:
appUseProbability
- The value for appUseProbability (can benull
)- Returns:
this
builder for use in a chained invocation
-
setMaximumSocialContactReduction
@CanIgnoreReturnValue public final PartialDemographicAdjustment.Builder setMaximumSocialContactReduction(Abstraction.SimpleFunction maximumSocialContactReduction) Initializes the value for themaximumSocialContactReduction
attribute.- Parameters:
maximumSocialContactReduction
- The value for maximumSocialContactReduction (can benull
)- Returns:
this
builder for use in a chained invocation
-
setPeakToRecoveryDelay
@CanIgnoreReturnValue public final PartialDemographicAdjustment.Builder setPeakToRecoveryDelay(Abstraction.SimpleFunction peakToRecoveryDelay) Initializes the value for thepeakToRecoveryDelay
attribute.- Parameters:
peakToRecoveryDelay
- The value for peakToRecoveryDelay (can benull
)- Returns:
this
builder for use in a chained invocation
-
setIncubationPeriod
@CanIgnoreReturnValue public final PartialDemographicAdjustment.Builder setIncubationPeriod(Abstraction.SimpleFunction incubationPeriod) Initializes the value for theincubationPeriod
attribute.- Parameters:
incubationPeriod
- The value for incubationPeriod (can benull
)- Returns:
this
builder for use in a chained invocation
-
setImmuneWaningHalfLife
@CanIgnoreReturnValue public final PartialDemographicAdjustment.Builder setImmuneWaningHalfLife(Abstraction.SimpleFunction immuneWaningHalfLife) Initializes the value for theimmuneWaningHalfLife
attribute.- Parameters:
immuneWaningHalfLife
- The value for immuneWaningHalfLife (can benull
)- Returns:
this
builder for use in a chained invocation
-
setInfectiousDuration
@CanIgnoreReturnValue public final PartialDemographicAdjustment.Builder setInfectiousDuration(Abstraction.SimpleFunction infectiousDuration) Initializes the value for theinfectiousDuration
attribute.- Parameters:
infectiousDuration
- The value for infectiousDuration (can benull
)- Returns:
this
builder for use in a chained invocation
-
setSymptomDuration
@CanIgnoreReturnValue public final PartialDemographicAdjustment.Builder setSymptomDuration(Abstraction.SimpleFunction symptomDuration) Initializes the value for thesymptomDuration
attribute.- Parameters:
symptomDuration
- The value for symptomDuration (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
Builds a newPartialDemographicAdjustment
.- Returns:
- An immutable instance of DemographicAdjustment
- Throws:
IllegalStateException
- if any required attributes are missing
-