Package io.github.ai4ci.output
Class ImmutablePersonStateCSV.Builder
java.lang.Object
io.github.ai4ci.output.ImmutablePersonStateCSV.Builder
- Enclosing class:
- ImmutablePersonStateCSV
Builds instances of type
ImmutablePersonStateCSV
.
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 newImmutablePersonStateCSV
.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
(PersonStateCSV instance) Fill a builder with attribute values from the providedio.github.ai4ci.output.PersonStateCSV
instance.setBehaviour
(String behaviour) Initializes the value for thebehaviour
attribute.setContactCount
(long contactCount) Initializes the value for thecontactCount
attribute.setContactExposure
(double contactExposure) Initializes the value for thecontactExposure
attribute.setDead
(boolean dead) Initializes the value for thedead
attribute.setExperimentName
(String experimentName) Initializes the value for theexperimentName
attribute.setExperimentReplica
(int experimentReplica) Initializes the value for theexperimentReplica
attribute.setExposureCount
(long exposureCount) Initializes the value for theexposureCount
attribute.setIncidentInfection
(boolean incidentInfection) Initializes the value for theincidentInfection
attribute.setInfectious
(boolean infectious) Initializes the value for theinfectious
attribute.setLogOddsInfectiousToday
(double logOddsInfectiousToday) Initializes the value for thelogOddsInfectiousToday
attribute.setModelName
(String modelName) Initializes the value for themodelName
attribute.setModelReplica
(int modelReplica) Initializes the value for themodelReplica
attribute.setNormalisedSeverity
(double normalisedSeverity) Initializes the value for thenormalisedSeverity
attribute.setNormalisedViralLoad
(double normalisedViralLoad) Initializes the value for thenormalisedViralLoad
attribute.setPersonId
(int personId) Initializes the value for thepersonId
attribute.setPresumedLocalPrevalence
(double presumedLocalPrevalence) Initializes the value for thepresumedLocalPrevalence
attribute.setProbabilityInfectiousToday
(double probabilityInfectiousToday) Initializes the value for theprobabilityInfectiousToday
attribute.setRequiringHospitalisation
(boolean requiringHospitalisation) Initializes the value for therequiringHospitalisation
attribute.setSymptomatic
(boolean symptomatic) Initializes the value for thesymptomatic
attribute.setTime
(int time) Initializes the value for thetime
attribute.setTrueLocalPrevalence
(double trueLocalPrevalence) Initializes the value for thetrueLocalPrevalence
attribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder from(CommonCSV.Execution instance) 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.PersonStateCSV
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 ImmutablePersonStateCSV.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
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setModelReplica(int modelReplica) 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 ImmutablePersonStateCSV.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
-
setPersonId
Initializes the value for thepersonId
attribute.- Parameters:
personId
- The value for personId- Returns:
this
builder for use in a chained invocation
-
setBehaviour
Initializes the value for thebehaviour
attribute.- Parameters:
behaviour
- The value for behaviour- Returns:
this
builder for use in a chained invocation
-
setInfectious
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setInfectious(boolean infectious) Initializes the value for theinfectious
attribute.- Parameters:
infectious
- The value for infectious- Returns:
this
builder for use in a chained invocation
-
setSymptomatic
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setSymptomatic(boolean symptomatic) Initializes the value for thesymptomatic
attribute.- Parameters:
symptomatic
- The value for symptomatic- Returns:
this
builder for use in a chained invocation
-
setRequiringHospitalisation
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setRequiringHospitalisation(boolean requiringHospitalisation) Initializes the value for therequiringHospitalisation
attribute.- Parameters:
requiringHospitalisation
- The value for requiringHospitalisation- Returns:
this
builder for use in a chained invocation
-
setDead
Initializes the value for thedead
attribute.- Parameters:
dead
- The value for dead- Returns:
this
builder for use in a chained invocation
-
setNormalisedSeverity
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setNormalisedSeverity(double normalisedSeverity) Initializes the value for thenormalisedSeverity
attribute.- Parameters:
normalisedSeverity
- The value for normalisedSeverity- Returns:
this
builder for use in a chained invocation
-
setNormalisedViralLoad
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setNormalisedViralLoad(double normalisedViralLoad) Initializes the value for thenormalisedViralLoad
attribute.- Parameters:
normalisedViralLoad
- The value for normalisedViralLoad- Returns:
this
builder for use in a chained invocation
-
setContactExposure
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setContactExposure(double contactExposure) Initializes the value for thecontactExposure
attribute.- Parameters:
contactExposure
- The value for contactExposure- Returns:
this
builder for use in a chained invocation
-
setPresumedLocalPrevalence
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setPresumedLocalPrevalence(double presumedLocalPrevalence) Initializes the value for thepresumedLocalPrevalence
attribute.- Parameters:
presumedLocalPrevalence
- The value for presumedLocalPrevalence- Returns:
this
builder for use in a chained invocation
-
setTrueLocalPrevalence
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setTrueLocalPrevalence(double trueLocalPrevalence) Initializes the value for thetrueLocalPrevalence
attribute.- Parameters:
trueLocalPrevalence
- The value for trueLocalPrevalence- Returns:
this
builder for use in a chained invocation
-
setProbabilityInfectiousToday
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setProbabilityInfectiousToday(double probabilityInfectiousToday) Initializes the value for theprobabilityInfectiousToday
attribute.- Parameters:
probabilityInfectiousToday
- The value for probabilityInfectiousToday- Returns:
this
builder for use in a chained invocation
-
setLogOddsInfectiousToday
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setLogOddsInfectiousToday(double logOddsInfectiousToday) Initializes the value for thelogOddsInfectiousToday
attribute.- Parameters:
logOddsInfectiousToday
- The value for logOddsInfectiousToday- Returns:
this
builder for use in a chained invocation
-
setContactCount
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setContactCount(long contactCount) Initializes the value for thecontactCount
attribute.- Parameters:
contactCount
- The value for contactCount- Returns:
this
builder for use in a chained invocation
-
setExposureCount
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setExposureCount(long exposureCount) Initializes the value for theexposureCount
attribute.- Parameters:
exposureCount
- The value for exposureCount- Returns:
this
builder for use in a chained invocation
-
setIncidentInfection
@CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setIncidentInfection(boolean incidentInfection) Initializes the value for theincidentInfection
attribute.- Parameters:
incidentInfection
- The value for incidentInfection- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutablePersonStateCSV
.- Returns:
- An immutable instance of PersonStateCSV
- Throws:
IllegalStateException
- if any required attributes are missing
-