Package io.github.ai4ci.abm.inhost
Class ImmutableInHostMarkovStateMachine.Builder
java.lang.Object
io.github.ai4ci.abm.inhost.ImmutableInHostMarkovStateMachine.Builder
- Enclosing class:
- ImmutableInHostMarkovStateMachine
Builds instances of type
ImmutableInHostMarkovStateMachine
.
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 newImmutableInHostMarkovStateMachine
.Fill a builder with attribute values from the providedInHostMarkovStateMachine
instance.setPAsymptomaticSymptomatic
(double pAsymptomaticSymptomatic) Initializes the value for thepAsymptomaticSymptomatic
attribute.setPExposedInfectious
(double pExposedInfectious) Initializes the value for thepExposedInfectious
attribute.setPHospitalisedAsymptomatic
(double pHospitalisedAsymptomatic) Initializes the value for thepHospitalisedAsymptomatic
attribute.setPHospitalisedDead
(double pHospitalisedDead) Initializes the value for thepHospitalisedDead
attribute.setPImmuneSusceptible
(double pImmuneSusceptible) Initializes the value for thepImmuneSusceptible
attribute.setPInfectiousImmune
(double pInfectiousImmune) Initializes the value for thepInfectiousImmune
attribute.setPSymptomaticAsymptomatic
(double pSymptomaticAsymptomatic) Initializes the value for thepSymptomaticAsymptomatic
attribute.setPSymptomaticDead
(double pSymptomaticDead) Initializes the value for thepSymptomaticDead
attribute.setPSymptomaticHospitalised
(double pSymptomaticHospitalised) Initializes the value for thepSymptomaticHospitalised
attribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableInHostMarkovStateMachine.Builder from(InHostMarkovState.InHostMarkovStateMachine instance) Fill a builder with attribute values from the providedInHostMarkovStateMachine
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setPExposedInfectious
@CanIgnoreReturnValue public final ImmutableInHostMarkovStateMachine.Builder setPExposedInfectious(double pExposedInfectious) Initializes the value for thepExposedInfectious
attribute.- Parameters:
pExposedInfectious
- The value for pExposedInfectious- Returns:
this
builder for use in a chained invocation
-
setPInfectiousImmune
@CanIgnoreReturnValue public final ImmutableInHostMarkovStateMachine.Builder setPInfectiousImmune(double pInfectiousImmune) Initializes the value for thepInfectiousImmune
attribute.- Parameters:
pInfectiousImmune
- The value for pInfectiousImmune- Returns:
this
builder for use in a chained invocation
-
setPImmuneSusceptible
@CanIgnoreReturnValue public final ImmutableInHostMarkovStateMachine.Builder setPImmuneSusceptible(double pImmuneSusceptible) Initializes the value for thepImmuneSusceptible
attribute.- Parameters:
pImmuneSusceptible
- The value for pImmuneSusceptible- Returns:
this
builder for use in a chained invocation
-
setPAsymptomaticSymptomatic
@CanIgnoreReturnValue public final ImmutableInHostMarkovStateMachine.Builder setPAsymptomaticSymptomatic(double pAsymptomaticSymptomatic) Initializes the value for thepAsymptomaticSymptomatic
attribute.- Parameters:
pAsymptomaticSymptomatic
- The value for pAsymptomaticSymptomatic- Returns:
this
builder for use in a chained invocation
-
setPSymptomaticAsymptomatic
@CanIgnoreReturnValue public final ImmutableInHostMarkovStateMachine.Builder setPSymptomaticAsymptomatic(double pSymptomaticAsymptomatic) Initializes the value for thepSymptomaticAsymptomatic
attribute.- Parameters:
pSymptomaticAsymptomatic
- The value for pSymptomaticAsymptomatic- Returns:
this
builder for use in a chained invocation
-
setPSymptomaticHospitalised
@CanIgnoreReturnValue public final ImmutableInHostMarkovStateMachine.Builder setPSymptomaticHospitalised(double pSymptomaticHospitalised) Initializes the value for thepSymptomaticHospitalised
attribute.- Parameters:
pSymptomaticHospitalised
- The value for pSymptomaticHospitalised- Returns:
this
builder for use in a chained invocation
-
setPSymptomaticDead
@CanIgnoreReturnValue public final ImmutableInHostMarkovStateMachine.Builder setPSymptomaticDead(double pSymptomaticDead) Initializes the value for thepSymptomaticDead
attribute.- Parameters:
pSymptomaticDead
- The value for pSymptomaticDead- Returns:
this
builder for use in a chained invocation
-
setPHospitalisedDead
@CanIgnoreReturnValue public final ImmutableInHostMarkovStateMachine.Builder setPHospitalisedDead(double pHospitalisedDead) Initializes the value for thepHospitalisedDead
attribute.- Parameters:
pHospitalisedDead
- The value for pHospitalisedDead- Returns:
this
builder for use in a chained invocation
-
setPHospitalisedAsymptomatic
@CanIgnoreReturnValue public final ImmutableInHostMarkovStateMachine.Builder setPHospitalisedAsymptomatic(double pHospitalisedAsymptomatic) Initializes the value for thepHospitalisedAsymptomatic
attribute.- Parameters:
pHospitalisedAsymptomatic
- The value for pHospitalisedAsymptomatic- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableInHostMarkovStateMachine
.- Returns:
- An immutable instance of InHostMarkovStateMachine
- Throws:
IllegalStateException
- if any required attributes are missing
-