Package io.github.ai4ci.abm
Class ImmutableOutbreakHistory.Builder
java.lang.Object
io.github.ai4ci.abm.ImmutableOutbreakHistory.Builder
- Enclosing class:
- ImmutableOutbreakHistory
Builds instances of type
ImmutableOutbreakHistory
.
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 newImmutableOutbreakHistory
.from
(OutbreakHistory instance) Fill a builder with attribute values from the providedio.github.ai4ci.abm.OutbreakHistory
instance.from
(OutbreakTemporalState instance) Fill a builder with attribute values from the providedio.github.ai4ci.abm.OutbreakTemporalState
instance.setCumulativeAdmissions
(long cumulativeAdmissions) Initializes the value for thecumulativeAdmissions
attribute.setCumulativeComplianceDecrease
(double cumulativeComplianceDecrease) Initializes the value for thecumulativeComplianceDecrease
attribute.setCumulativeInfections
(long cumulativeInfections) Initializes the value for thecumulativeInfections
attribute.setCumulativeMobilityDecrease
(double cumulativeMobilityDecrease) Initializes the value for thecumulativeMobilityDecrease
attribute.Initializes the value for theentity
attribute.setIncidence
(long incidence) Initializes the value for theincidence
attribute.setInfectedCount
(long infectedCount) Initializes the value for theinfectedCount
attribute.setMaximumHospitalBurden
(long maximumHospitalBurden) Initializes the value for themaximumHospitalBurden
attribute.setMaximumIncidence
(long maximumIncidence) Initializes the value for themaximumIncidence
attribute.setMaximumPrevalence
(double maximumPrevalence) Initializes the value for themaximumPrevalence
attribute.setTestNegativesByResultDate
(long testNegativesByResultDate) Initializes the value for thetestNegativesByResultDate
attribute.setTestPositivesByResultDate
(long testPositivesByResultDate) Initializes the value for thetestPositivesByResultDate
attribute.Initializes the value for thetime
attribute.setTimeToMaximumIncidence
(long timeToMaximumIncidence) Initializes the value for thetimeToMaximumIncidence
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.github.ai4ci.abm.OutbreakHistory
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder from(OutbreakTemporalState instance) Fill a builder with attribute values from the providedio.github.ai4ci.abm.OutbreakTemporalState
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setEntity
Initializes the value for theentity
attribute.- Parameters:
entity
- The value for entity- 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
-
setInfectedCount
@CanIgnoreReturnValue public final ImmutableOutbreakHistory.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
-
setIncidence
Initializes the value for theincidence
attribute.- Parameters:
incidence
- The value for incidence- Returns:
this
builder for use in a chained invocation
-
setTestPositivesByResultDate
@CanIgnoreReturnValue public final ImmutableOutbreakHistory.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 ImmutableOutbreakHistory.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
-
setCumulativeInfections
@CanIgnoreReturnValue public final ImmutableOutbreakHistory.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
-
setCumulativeAdmissions
@CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setCumulativeAdmissions(long cumulativeAdmissions) Initializes the value for thecumulativeAdmissions
attribute.- Parameters:
cumulativeAdmissions
- The value for cumulativeAdmissions- Returns:
this
builder for use in a chained invocation
-
setMaximumIncidence
@CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setMaximumIncidence(long maximumIncidence) Initializes the value for themaximumIncidence
attribute.- Parameters:
maximumIncidence
- The value for maximumIncidence- Returns:
this
builder for use in a chained invocation
-
setTimeToMaximumIncidence
@CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setTimeToMaximumIncidence(long timeToMaximumIncidence) Initializes the value for thetimeToMaximumIncidence
attribute.- Parameters:
timeToMaximumIncidence
- The value for timeToMaximumIncidence- Returns:
this
builder for use in a chained invocation
-
setMaximumHospitalBurden
@CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setMaximumHospitalBurden(long maximumHospitalBurden) Initializes the value for themaximumHospitalBurden
attribute.- Parameters:
maximumHospitalBurden
- The value for maximumHospitalBurden- Returns:
this
builder for use in a chained invocation
-
setMaximumPrevalence
@CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setMaximumPrevalence(double maximumPrevalence) Initializes the value for themaximumPrevalence
attribute.- Parameters:
maximumPrevalence
- The value for maximumPrevalence- Returns:
this
builder for use in a chained invocation
-
setCumulativeMobilityDecrease
@CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setCumulativeMobilityDecrease(double cumulativeMobilityDecrease) Initializes the value for thecumulativeMobilityDecrease
attribute.- Parameters:
cumulativeMobilityDecrease
- The value for cumulativeMobilityDecrease- Returns:
this
builder for use in a chained invocation
-
setCumulativeComplianceDecrease
@CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setCumulativeComplianceDecrease(double cumulativeComplianceDecrease) Initializes the value for thecumulativeComplianceDecrease
attribute.- Parameters:
cumulativeComplianceDecrease
- The value for cumulativeComplianceDecrease- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableOutbreakHistory
.- Returns:
- An immutable instance of OutbreakHistory
- Throws:
IllegalStateException
- if any required attributes are missing
-