Package io.github.ai4ci.abm
Class ImmutableOutbreakState.Builder
java.lang.Object
io.github.ai4ci.abm.ImmutableOutbreakState.Builder
- Enclosing class:
- ImmutableOutbreakState
Builds instances of type
ImmutableOutbreakState
.
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 newImmutableOutbreakState
.from
(OutbreakState instance) Fill a builder with attribute values from the providedio.github.ai4ci.abm.OutbreakState
instance.from
(OutbreakTemporalState instance) Fill a builder with attribute values from the providedio.github.ai4ci.abm.OutbreakTemporalState
instance.setContactDetectedProbability
(double contactDetectedProbability) Initializes the value for thecontactDetectedProbability
attribute.Initializes the value for theentity
attribute.setPresumedIncubationPeriod
(int presumedIncubationPeriod) Initializes the value for thepresumedIncubationPeriod
attribute.setPresumedInfectiousPeriod
(int presumedInfectiousPeriod) Initializes the value for thepresumedInfectiousPeriod
attribute.setPresumedSymptomSensitivity
(double presumedSymptomSensitivity) Initializes the value for thepresumedSymptomSensitivity
attribute.setPresumedSymptomSpecificity
(double presumedSymptomSpecificity) Initializes the value for thepresumedSymptomSpecificity
attribute.Initializes the value for thetime
attribute.setTransmissibilityModifier
(double transmissibilityModifier) Initializes the value for thetransmissibilityModifier
attribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableOutbreakState.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
-
from
Fill a builder with attribute values from the providedio.github.ai4ci.abm.OutbreakState
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
-
setTransmissibilityModifier
@CanIgnoreReturnValue public final ImmutableOutbreakState.Builder setTransmissibilityModifier(double transmissibilityModifier) Initializes the value for thetransmissibilityModifier
attribute.- Parameters:
transmissibilityModifier
- The value for transmissibilityModifier- Returns:
this
builder for use in a chained invocation
-
setContactDetectedProbability
@CanIgnoreReturnValue public final ImmutableOutbreakState.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
-
setPresumedInfectiousPeriod
@CanIgnoreReturnValue public final ImmutableOutbreakState.Builder setPresumedInfectiousPeriod(int presumedInfectiousPeriod) Initializes the value for thepresumedInfectiousPeriod
attribute.- Parameters:
presumedInfectiousPeriod
- The value for presumedInfectiousPeriod- Returns:
this
builder for use in a chained invocation
-
setPresumedIncubationPeriod
@CanIgnoreReturnValue public final ImmutableOutbreakState.Builder setPresumedIncubationPeriod(int presumedIncubationPeriod) Initializes the value for thepresumedIncubationPeriod
attribute.- Parameters:
presumedIncubationPeriod
- The value for presumedIncubationPeriod- Returns:
this
builder for use in a chained invocation
-
setPresumedSymptomSpecificity
@CanIgnoreReturnValue public final ImmutableOutbreakState.Builder setPresumedSymptomSpecificity(double presumedSymptomSpecificity) Initializes the value for thepresumedSymptomSpecificity
attribute.- Parameters:
presumedSymptomSpecificity
- The value for presumedSymptomSpecificity- Returns:
this
builder for use in a chained invocation
-
setPresumedSymptomSensitivity
@CanIgnoreReturnValue public final ImmutableOutbreakState.Builder setPresumedSymptomSensitivity(double presumedSymptomSensitivity) Initializes the value for thepresumedSymptomSensitivity
attribute.- Parameters:
presumedSymptomSensitivity
- The value for presumedSymptomSensitivity- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableOutbreakState
.- Returns:
- An immutable instance of OutbreakState
- Throws:
IllegalStateException
- if any required attributes are missing
-