Package io.github.ai4ci.config
Class ImmutableExecutionConfiguration.Builder
java.lang.Object
io.github.ai4ci.config.ImmutableExecutionConfiguration.Builder
- Enclosing class:
- ImmutableExecutionConfiguration
Builds instances of type
ImmutableExecutionConfiguration
.
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 newImmutableExecutionConfiguration
.from
(Abstraction.Named instance) Fill a builder with attribute values from the providedio.github.ai4ci.abm.mechanics.Abstraction.Named
instance.from
(Abstraction.Replica instance) Fill a builder with attribute values from the providedio.github.ai4ci.abm.mechanics.Abstraction.Replica
instance.from
(ExecutionConfiguration instance) Fill a builder with attribute values from the providedio.github.ai4ci.config.ExecutionConfiguration
instance.setAppUseProbability
(Abstraction.Distribution appUseProbability) Initializes the value for theappUseProbability
attribute.setAsymptomaticFraction
(Double asymptomaticFraction) Initializes the value for theasymptomaticFraction
attribute.setAvailableTests
(ShallowList<TestParameters> availableTests) Initializes the value for theavailableTests
attribute.setCaseFatalityRate
(Double caseFatalityRate) Initializes the value for thecaseFatalityRate
attribute.setCaseHospitalisationRate
(Double caseHospitalisationRate) Initializes the value for thecaseHospitalisationRate
attribute.setComplianceDeteriorationRate
(Double complianceDeteriorationRate) Initializes the value for thecomplianceDeteriorationRate
attribute.setComplianceImprovementRate
(Double complianceImprovementRate) Initializes the value for thecomplianceImprovementRate
attribute.setComplianceProbability
(Abstraction.Distribution complianceProbability) Initializes the value for thecomplianceProbability
attribute.setContactDetectedProbability
(Double contactDetectedProbability) Initializes the value for thecontactDetectedProbability
attribute.setDefaultBehaviourModelName
(String defaultBehaviourModelName) Initializes the value for thedefaultBehaviourModelName
attribute.setDefaultPolicyModelName
(String defaultPolicyModelName) Initializes the value for thedefaultPolicyModelName
attribute.setDemographicAdjustment
(PartialDemographicAdjustment demographicAdjustment) Initializes the value for thedemographicAdjustment
attribute.setImportationProbability
(Double importationProbability) Initializes the value for theimportationProbability
attribute.setInHostConfiguration
(InHostConfiguration inHostConfiguration) Initializes the value for theinHostConfiguration
attribute.setInitialEstimateIncubationPeriod
(Double initialEstimateIncubationPeriod) Initializes the value for theinitialEstimateIncubationPeriod
attribute.setInitialEstimateInfectionDuration
(Double initialEstimateInfectionDuration) Initializes the value for theinitialEstimateInfectionDuration
attribute.setInitialEstimateSymptomSensitivity
(Double initialEstimateSymptomSensitivity) Initializes the value for theinitialEstimateSymptomSensitivity
attribute.setInitialEstimateSymptomSpecificity
(Double initialEstimateSymptomSpecificity) Initializes the value for theinitialEstimateSymptomSpecificity
attribute.setLockdownReleasePrevalenceTrigger
(Double lockdownReleasePrevalenceTrigger) Initializes the value for thelockdownReleasePrevalenceTrigger
attribute.setLockdownStartPrevalenceTrigger
(Double lockdownStartPrevalenceTrigger) Initializes the value for thelockdownStartPrevalenceTrigger
attribute.setMaximumSocialContactReduction
(Abstraction.Distribution maximumSocialContactReduction) Initializes the value for themaximumSocialContactReduction
attribute.Initializes the value for thename
attribute.setOrganicRateOfMobilityChange
(Double organicRateOfMobilityChange) Initializes the value for theorganicRateOfMobilityChange
attribute.setReplicate
(Integer replicate) Initializes the value for thereplicate
attribute.setRiskModelContactsKernel
(RiskKernelConfiguration riskModelContactsKernel) Initializes the value for theriskModelContactsKernel
attribute.setRiskModelSymptomKernel
(RiskKernelConfiguration riskModelSymptomKernel) Initializes the value for theriskModelSymptomKernel
attribute.setRiskModelTestKernel
(RiskKernelConfiguration riskModelTestKernel) Initializes the value for theriskModelTestKernel
attribute.Initializes the value for therO
attribute.setSmartAppRiskTrigger
(Double smartAppRiskTrigger) Initializes the value for thesmartAppRiskTrigger
attribute.setSymptomSensitivity
(Abstraction.Distribution symptomSensitivity) Initializes the value for thesymptomSensitivity
attribute.setSymptomSpecificity
(Abstraction.Distribution symptomSpecificity) Initializes the value for thesymptomSpecificity
attribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder from(Abstraction.Named instance) Fill a builder with attribute values from the providedio.github.ai4ci.abm.mechanics.Abstraction.Named
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder from(ExecutionConfiguration instance) Fill a builder with attribute values from the providedio.github.ai4ci.config.ExecutionConfiguration
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder from(Abstraction.Replica instance) Fill a builder with attribute values from the providedio.github.ai4ci.abm.mechanics.Abstraction.Replica
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setName
Initializes the value for thename
attribute.- Parameters:
name
- The value for name- Returns:
this
builder for use in a chained invocation
-
setReplicate
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setReplicate(Integer replicate) Initializes the value for thereplicate
attribute.If not set, this attribute will have a default value as returned by the initializer of
replicate
.- Parameters:
replicate
- The value for replicate- Returns:
this
builder for use in a chained invocation
-
setRO
Initializes the value for therO
attribute.- Parameters:
rO
- The value for rO- Returns:
this
builder for use in a chained invocation
-
setAsymptomaticFraction
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setAsymptomaticFraction(Double asymptomaticFraction) Initializes the value for theasymptomaticFraction
attribute.- Parameters:
asymptomaticFraction
- The value for asymptomaticFraction- Returns:
this
builder for use in a chained invocation
-
setCaseHospitalisationRate
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setCaseHospitalisationRate(Double caseHospitalisationRate) Initializes the value for thecaseHospitalisationRate
attribute.- Parameters:
caseHospitalisationRate
- The value for caseHospitalisationRate- Returns:
this
builder for use in a chained invocation
-
setCaseFatalityRate
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setCaseFatalityRate(Double caseFatalityRate) Initializes the value for thecaseFatalityRate
attribute.- Parameters:
caseFatalityRate
- The value for caseFatalityRate- Returns:
this
builder for use in a chained invocation
-
setContactDetectedProbability
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setContactDetectedProbability(Double contactDetectedProbability) Initializes the value for thecontactDetectedProbability
attribute.- Parameters:
contactDetectedProbability
- The value for contactDetectedProbability- Returns:
this
builder for use in a chained invocation
-
setComplianceProbability
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setComplianceProbability(Abstraction.Distribution complianceProbability) Initializes the value for thecomplianceProbability
attribute.- Parameters:
complianceProbability
- The value for complianceProbability- Returns:
this
builder for use in a chained invocation
-
setAppUseProbability
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setAppUseProbability(Abstraction.Distribution appUseProbability) Initializes the value for theappUseProbability
attribute.- Parameters:
appUseProbability
- The value for appUseProbability- Returns:
this
builder for use in a chained invocation
-
setInHostConfiguration
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setInHostConfiguration(InHostConfiguration inHostConfiguration) Initializes the value for theinHostConfiguration
attribute.- Parameters:
inHostConfiguration
- The value for inHostConfiguration- Returns:
this
builder for use in a chained invocation
-
setAvailableTests
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setAvailableTests(ShallowList<TestParameters> availableTests) Initializes the value for theavailableTests
attribute.- Parameters:
availableTests
- The value for availableTests- Returns:
this
builder for use in a chained invocation
-
setSymptomSensitivity
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setSymptomSensitivity(Abstraction.Distribution symptomSensitivity) Initializes the value for thesymptomSensitivity
attribute.- Parameters:
symptomSensitivity
- The value for symptomSensitivity- Returns:
this
builder for use in a chained invocation
-
setSymptomSpecificity
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setSymptomSpecificity(Abstraction.Distribution symptomSpecificity) Initializes the value for thesymptomSpecificity
attribute.- Parameters:
symptomSpecificity
- The value for symptomSpecificity- Returns:
this
builder for use in a chained invocation
-
setInitialEstimateInfectionDuration
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setInitialEstimateInfectionDuration(Double initialEstimateInfectionDuration) Initializes the value for theinitialEstimateInfectionDuration
attribute.- Parameters:
initialEstimateInfectionDuration
- The value for initialEstimateInfectionDuration- Returns:
this
builder for use in a chained invocation
-
setInitialEstimateIncubationPeriod
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setInitialEstimateIncubationPeriod(Double initialEstimateIncubationPeriod) Initializes the value for theinitialEstimateIncubationPeriod
attribute.- Parameters:
initialEstimateIncubationPeriod
- The value for initialEstimateIncubationPeriod- Returns:
this
builder for use in a chained invocation
-
setInitialEstimateSymptomSensitivity
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setInitialEstimateSymptomSensitivity(Double initialEstimateSymptomSensitivity) Initializes the value for theinitialEstimateSymptomSensitivity
attribute.- Parameters:
initialEstimateSymptomSensitivity
- The value for initialEstimateSymptomSensitivity- Returns:
this
builder for use in a chained invocation
-
setInitialEstimateSymptomSpecificity
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setInitialEstimateSymptomSpecificity(Double initialEstimateSymptomSpecificity) Initializes the value for theinitialEstimateSymptomSpecificity
attribute.- Parameters:
initialEstimateSymptomSpecificity
- The value for initialEstimateSymptomSpecificity- Returns:
this
builder for use in a chained invocation
-
setRiskModelSymptomKernel
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setRiskModelSymptomKernel(RiskKernelConfiguration riskModelSymptomKernel) Initializes the value for theriskModelSymptomKernel
attribute.- Parameters:
riskModelSymptomKernel
- The value for riskModelSymptomKernel- Returns:
this
builder for use in a chained invocation
-
setRiskModelTestKernel
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setRiskModelTestKernel(RiskKernelConfiguration riskModelTestKernel) Initializes the value for theriskModelTestKernel
attribute.- Parameters:
riskModelTestKernel
- The value for riskModelTestKernel- Returns:
this
builder for use in a chained invocation
-
setRiskModelContactsKernel
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setRiskModelContactsKernel(RiskKernelConfiguration riskModelContactsKernel) Initializes the value for theriskModelContactsKernel
attribute.- Parameters:
riskModelContactsKernel
- The value for riskModelContactsKernel- Returns:
this
builder for use in a chained invocation
-
setMaximumSocialContactReduction
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setMaximumSocialContactReduction(Abstraction.Distribution maximumSocialContactReduction) Initializes the value for themaximumSocialContactReduction
attribute.- Parameters:
maximumSocialContactReduction
- The value for maximumSocialContactReduction- Returns:
this
builder for use in a chained invocation
-
setDefaultBehaviourModelName
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setDefaultBehaviourModelName(String defaultBehaviourModelName) Initializes the value for thedefaultBehaviourModelName
attribute.- Parameters:
defaultBehaviourModelName
- The value for defaultBehaviourModelName- Returns:
this
builder for use in a chained invocation
-
setDefaultPolicyModelName
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setDefaultPolicyModelName(String defaultPolicyModelName) Initializes the value for thedefaultPolicyModelName
attribute.- Parameters:
defaultPolicyModelName
- The value for defaultPolicyModelName- Returns:
this
builder for use in a chained invocation
-
setComplianceDeteriorationRate
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setComplianceDeteriorationRate(Double complianceDeteriorationRate) Initializes the value for thecomplianceDeteriorationRate
attribute.- Parameters:
complianceDeteriorationRate
- The value for complianceDeteriorationRate- Returns:
this
builder for use in a chained invocation
-
setComplianceImprovementRate
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setComplianceImprovementRate(Double complianceImprovementRate) Initializes the value for thecomplianceImprovementRate
attribute.- Parameters:
complianceImprovementRate
- The value for complianceImprovementRate- Returns:
this
builder for use in a chained invocation
-
setOrganicRateOfMobilityChange
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setOrganicRateOfMobilityChange(Double organicRateOfMobilityChange) Initializes the value for theorganicRateOfMobilityChange
attribute.- Parameters:
organicRateOfMobilityChange
- The value for organicRateOfMobilityChange- Returns:
this
builder for use in a chained invocation
-
setLockdownReleasePrevalenceTrigger
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setLockdownReleasePrevalenceTrigger(Double lockdownReleasePrevalenceTrigger) Initializes the value for thelockdownReleasePrevalenceTrigger
attribute.- Parameters:
lockdownReleasePrevalenceTrigger
- The value for lockdownReleasePrevalenceTrigger- Returns:
this
builder for use in a chained invocation
-
setLockdownStartPrevalenceTrigger
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setLockdownStartPrevalenceTrigger(Double lockdownStartPrevalenceTrigger) Initializes the value for thelockdownStartPrevalenceTrigger
attribute.- Parameters:
lockdownStartPrevalenceTrigger
- The value for lockdownStartPrevalenceTrigger- Returns:
this
builder for use in a chained invocation
-
setImportationProbability
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setImportationProbability(Double importationProbability) Initializes the value for theimportationProbability
attribute.- Parameters:
importationProbability
- The value for importationProbability- Returns:
this
builder for use in a chained invocation
-
setSmartAppRiskTrigger
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setSmartAppRiskTrigger(Double smartAppRiskTrigger) Initializes the value for thesmartAppRiskTrigger
attribute.- Parameters:
smartAppRiskTrigger
- The value for smartAppRiskTrigger- Returns:
this
builder for use in a chained invocation
-
setDemographicAdjustment
@CanIgnoreReturnValue public final ImmutableExecutionConfiguration.Builder setDemographicAdjustment(PartialDemographicAdjustment demographicAdjustment) Initializes the value for thedemographicAdjustment
attribute.- Parameters:
demographicAdjustment
- The value for demographicAdjustment- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableExecutionConfiguration
.- Returns:
- An immutable instance of ExecutionConfiguration
- Throws:
IllegalStateException
- if any required attributes are missing
-