Package io.github.ai4ci.output
Class ImmutableOutbreakCSV.Builder
java.lang.Object
io.github.ai4ci.output.ImmutableOutbreakCSV.Builder
- Enclosing class:
- ImmutableOutbreakCSV
Builds instances of type
ImmutableOutbreakCSV
.
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 newImmutableOutbreakCSV
.from
(CommonCSV.Execution instance) Fill a builder with attribute values from the providedio.github.ai4ci.output.CommonCSV.Execution
instance.from
(CommonCSV.Model instance) Fill a builder with attribute values from the providedio.github.ai4ci.output.CommonCSV.Model
instance.from
(CommonCSV.State instance) Fill a builder with attribute values from the providedio.github.ai4ci.output.CommonCSV.State
instance.from
(OutbreakCSV instance) Fill a builder with attribute values from the providedio.github.ai4ci.output.OutbreakCSV
instance.setAverageCompliance
(double averageCompliance) Initializes the value for theaverageCompliance
attribute.setAverageMobility
(double averageMobility) Initializes the value for theaverageMobility
attribute.setAverageViralLoad
(double averageViralLoad) Initializes the value for theaverageViralLoad
attribute.setCumulativeDeaths
(long cumulativeDeaths) Initializes the value for thecumulativeDeaths
attribute.setCumulativeInfections
(long cumulativeInfections) Initializes the value for thecumulativeInfections
attribute.setExperimentName
(String experimentName) Initializes the value for theexperimentName
attribute.setExperimentReplica
(int experimentReplica) Initializes the value for theexperimentReplica
attribute.setHospitalisedCount
(long hospitalisedCount) Initializes the value for thehospitalisedCount
attribute.setIncidence
(long incidence) Initializes the value for theincidence
attribute.setInfectedCount
(long infectedCount) Initializes the value for theinfectedCount
attribute.setModelName
(String modelName) Initializes the value for themodelName
attribute.setModelReplica
(int modelReplica) Initializes the value for themodelReplica
attribute.Initializes the value for thepolicy
attribute.setPresumedTestPositivePrevalence
(double presumedTestPositivePrevalence) Initializes the value for thepresumedTestPositivePrevalence
attribute.setPrevalence
(double prevalence) Initializes the value for theprevalence
attribute.setRtEffective
(double rtEffective) Initializes the value for thertEffective
attribute.setSymptomaticCount
(long symptomaticCount) Initializes the value for thesymptomaticCount
attribute.setTestNegativesByResultDate
(long testNegativesByResultDate) Initializes the value for thetestNegativesByResultDate
attribute.setTestPositivesByResultDate
(long testPositivesByResultDate) Initializes the value for thetestPositivesByResultDate
attribute.setTime
(int time) Initializes the value for thetime
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.github.ai4ci.output.OutbreakCSV
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedio.github.ai4ci.output.CommonCSV.Execution
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedio.github.ai4ci.output.CommonCSV.State
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedio.github.ai4ci.output.CommonCSV.Model
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setModelName
Initializes the value for themodelName
attribute.- Parameters:
modelName
- The value for modelName- Returns:
this
builder for use in a chained invocation
-
setExperimentName
@CanIgnoreReturnValue public final ImmutableOutbreakCSV.Builder setExperimentName(String experimentName) Initializes the value for theexperimentName
attribute.- Parameters:
experimentName
- The value for experimentName- Returns:
this
builder for use in a chained invocation
-
setModelReplica
Initializes the value for themodelReplica
attribute.- Parameters:
modelReplica
- The value for modelReplica- Returns:
this
builder for use in a chained invocation
-
setExperimentReplica
@CanIgnoreReturnValue public final ImmutableOutbreakCSV.Builder setExperimentReplica(int experimentReplica) Initializes the value for theexperimentReplica
attribute.- Parameters:
experimentReplica
- The value for experimentReplica- Returns:
this
builder for use in a chained invocation
-
setTime
Initializes the value for thetime
attribute.- Parameters:
time
- The value for time- Returns:
this
builder for use in a chained invocation
-
setIncidence
Initializes the value for theincidence
attribute.- Parameters:
incidence
- The value for incidence- Returns:
this
builder for use in a chained invocation
-
setPrevalence
Initializes the value for theprevalence
attribute.- Parameters:
prevalence
- The value for prevalence- Returns:
this
builder for use in a chained invocation
-
setCumulativeInfections
@CanIgnoreReturnValue public final ImmutableOutbreakCSV.Builder setCumulativeInfections(long cumulativeInfections) Initializes the value for thecumulativeInfections
attribute.- Parameters:
cumulativeInfections
- The value for cumulativeInfections- Returns:
this
builder for use in a chained invocation
-
setCumulativeDeaths
@CanIgnoreReturnValue public final ImmutableOutbreakCSV.Builder setCumulativeDeaths(long cumulativeDeaths) Initializes the value for thecumulativeDeaths
attribute.- Parameters:
cumulativeDeaths
- The value for cumulativeDeaths- Returns:
this
builder for use in a chained invocation
-
setHospitalisedCount
@CanIgnoreReturnValue public final ImmutableOutbreakCSV.Builder setHospitalisedCount(long hospitalisedCount) Initializes the value for thehospitalisedCount
attribute.- Parameters:
hospitalisedCount
- The value for hospitalisedCount- Returns:
this
builder for use in a chained invocation
-
setInfectedCount
@CanIgnoreReturnValue public final ImmutableOutbreakCSV.Builder setInfectedCount(long infectedCount) Initializes the value for theinfectedCount
attribute.- Parameters:
infectedCount
- The value for infectedCount- Returns:
this
builder for use in a chained invocation
-
setSymptomaticCount
@CanIgnoreReturnValue public final ImmutableOutbreakCSV.Builder setSymptomaticCount(long symptomaticCount) Initializes the value for thesymptomaticCount
attribute.- Parameters:
symptomaticCount
- The value for symptomaticCount- Returns:
this
builder for use in a chained invocation
-
setAverageMobility
@CanIgnoreReturnValue public final ImmutableOutbreakCSV.Builder setAverageMobility(double averageMobility) Initializes the value for theaverageMobility
attribute.- Parameters:
averageMobility
- The value for averageMobility- Returns:
this
builder for use in a chained invocation
-
setAverageViralLoad
@CanIgnoreReturnValue public final ImmutableOutbreakCSV.Builder setAverageViralLoad(double averageViralLoad) Initializes the value for theaverageViralLoad
attribute.- Parameters:
averageViralLoad
- The value for averageViralLoad- Returns:
this
builder for use in a chained invocation
-
setAverageCompliance
@CanIgnoreReturnValue public final ImmutableOutbreakCSV.Builder setAverageCompliance(double averageCompliance) Initializes the value for theaverageCompliance
attribute.- Parameters:
averageCompliance
- The value for averageCompliance- Returns:
this
builder for use in a chained invocation
-
setTestPositivesByResultDate
@CanIgnoreReturnValue public final ImmutableOutbreakCSV.Builder setTestPositivesByResultDate(long testPositivesByResultDate) Initializes the value for thetestPositivesByResultDate
attribute.- Parameters:
testPositivesByResultDate
- The value for testPositivesByResultDate- Returns:
this
builder for use in a chained invocation
-
setTestNegativesByResultDate
@CanIgnoreReturnValue public final ImmutableOutbreakCSV.Builder setTestNegativesByResultDate(long testNegativesByResultDate) Initializes the value for thetestNegativesByResultDate
attribute.- Parameters:
testNegativesByResultDate
- The value for testNegativesByResultDate- Returns:
this
builder for use in a chained invocation
-
setPresumedTestPositivePrevalence
@CanIgnoreReturnValue public final ImmutableOutbreakCSV.Builder setPresumedTestPositivePrevalence(double presumedTestPositivePrevalence) Initializes the value for thepresumedTestPositivePrevalence
attribute.- Parameters:
presumedTestPositivePrevalence
- The value for presumedTestPositivePrevalence- Returns:
this
builder for use in a chained invocation
-
setRtEffective
Initializes the value for thertEffective
attribute.- Parameters:
rtEffective
- The value for rtEffective- Returns:
this
builder for use in a chained invocation
-
setPolicy
Initializes the value for thepolicy
attribute.- Parameters:
policy
- The value for policy- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableOutbreakCSV
.- Returns:
- An immutable instance of OutbreakCSV
- Throws:
IllegalStateException
- if any required attributes are missing
-