Package io.github.ai4ci.abm.inhost
Class ImmutableInHostStochasticState.Builder
java.lang.Object
io.github.ai4ci.abm.inhost.ImmutableInHostStochasticState.Builder
- Enclosing class:
- ImmutableInHostStochasticState
Builds instances of type
ImmutableInHostStochasticState
.
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 newImmutableInHostStochasticState
.from
(InHostStochasticState instance) Fill a builder with attribute values from the providedInHostStochasticState
instance.setBaselineViralInfectionRate
(double baselineViralInfectionRate) Initializes the value for thebaselineViralInfectionRate
attribute.setBaselineViralReplicationRate
(double baselineViralReplicationRate) Initializes the value for thebaselineViralReplicationRate
attribute.Initializes the value for theimmune
attribute.setImmuneActivationRate
(double immuneActivationRate) Initializes the value for theimmuneActivationRate
attribute.setImmuneActive
(int immuneActive) Initializes the value for theimmuneActive
attribute.setImmunePriming
(int immunePriming) Initializes the value for theimmunePriming
attribute.setImmuneTargetRatio
(double immuneTargetRatio) Initializes the value for theimmuneTargetRatio
attribute.setImmuneWaningRate
(double immuneWaningRate) Initializes the value for theimmuneWaningRate
attribute.setInfectionCarrierProbability
(double infectionCarrierProbability) Initializes the value for theinfectionCarrierProbability
attribute.setTargetExposed
(int targetExposed) Initializes the value for thetargetExposed
attribute.setTargetInfected
(int targetInfected) Initializes the value for thetargetInfected
attribute.setTargetRecoveryRate
(double targetRecoveryRate) Initializes the value for thetargetRecoveryRate
attribute.setTargets
(int targets) Initializes the value for thetargets
attribute.setTargetSusceptible
(int targetSusceptible) Initializes the value for thetargetSusceptible
attribute.setTime
(int time) Initializes the value for thetime
attribute.setVirions
(int virions) Initializes the value for thevirions
attribute.setVirionsDiseaseCutoff
(int virionsDiseaseCutoff) Initializes the value for thevirionsDiseaseCutoff
attribute.setVirionsProduced
(int virionsProduced) Initializes the value for thevirionsProduced
attribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder from(InHostStochasticState instance) Fill a builder with attribute values from the providedInHostStochasticState
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
-
setTargets
Initializes the value for thetargets
attribute.- Parameters:
targets
- The value for targets- Returns:
this
builder for use in a chained invocation
-
setImmuneTargetRatio
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setImmuneTargetRatio(double immuneTargetRatio) Initializes the value for theimmuneTargetRatio
attribute.- Parameters:
immuneTargetRatio
- The value for immuneTargetRatio- Returns:
this
builder for use in a chained invocation
-
setImmuneActivationRate
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setImmuneActivationRate(double immuneActivationRate) Initializes the value for theimmuneActivationRate
attribute.- Parameters:
immuneActivationRate
- The value for immuneActivationRate- Returns:
this
builder for use in a chained invocation
-
setImmuneWaningRate
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setImmuneWaningRate(double immuneWaningRate) Initializes the value for theimmuneWaningRate
attribute.- Parameters:
immuneWaningRate
- The value for immuneWaningRate- Returns:
this
builder for use in a chained invocation
-
setInfectionCarrierProbability
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setInfectionCarrierProbability(double infectionCarrierProbability) Initializes the value for theinfectionCarrierProbability
attribute.- Parameters:
infectionCarrierProbability
- The value for infectionCarrierProbability- Returns:
this
builder for use in a chained invocation
-
setTargetRecoveryRate
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setTargetRecoveryRate(double targetRecoveryRate) Initializes the value for thetargetRecoveryRate
attribute.- Parameters:
targetRecoveryRate
- The value for targetRecoveryRate- 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
-
setVirions
Initializes the value for thevirions
attribute.- Parameters:
virions
- The value for virions- Returns:
this
builder for use in a chained invocation
-
setVirionsProduced
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setVirionsProduced(int virionsProduced) Initializes the value for thevirionsProduced
attribute.- Parameters:
virionsProduced
- The value for virionsProduced- Returns:
this
builder for use in a chained invocation
-
setTargetSusceptible
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setTargetSusceptible(int targetSusceptible) Initializes the value for thetargetSusceptible
attribute.- Parameters:
targetSusceptible
- The value for targetSusceptible- Returns:
this
builder for use in a chained invocation
-
setTargetExposed
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setTargetExposed(int targetExposed) Initializes the value for thetargetExposed
attribute.- Parameters:
targetExposed
- The value for targetExposed- Returns:
this
builder for use in a chained invocation
-
setTargetInfected
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setTargetInfected(int targetInfected) Initializes the value for thetargetInfected
attribute.- Parameters:
targetInfected
- The value for targetInfected- Returns:
this
builder for use in a chained invocation
-
setImmune
Initializes the value for theimmune
attribute.If not set, this attribute will have a default value as returned by the initializer of
immune
.- Parameters:
immune
- The value for immune- Returns:
this
builder for use in a chained invocation
-
setImmunePriming
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setImmunePriming(int immunePriming) Initializes the value for theimmunePriming
attribute.- Parameters:
immunePriming
- The value for immunePriming- Returns:
this
builder for use in a chained invocation
-
setImmuneActive
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setImmuneActive(int immuneActive) Initializes the value for theimmuneActive
attribute.- Parameters:
immuneActive
- The value for immuneActive- Returns:
this
builder for use in a chained invocation
-
setBaselineViralReplicationRate
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setBaselineViralReplicationRate(double baselineViralReplicationRate) Initializes the value for thebaselineViralReplicationRate
attribute.- Parameters:
baselineViralReplicationRate
- The value for baselineViralReplicationRate- Returns:
this
builder for use in a chained invocation
-
setBaselineViralInfectionRate
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setBaselineViralInfectionRate(double baselineViralInfectionRate) Initializes the value for thebaselineViralInfectionRate
attribute.- Parameters:
baselineViralInfectionRate
- The value for baselineViralInfectionRate- Returns:
this
builder for use in a chained invocation
-
setVirionsDiseaseCutoff
@CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setVirionsDiseaseCutoff(int virionsDiseaseCutoff) Initializes the value for thevirionsDiseaseCutoff
attribute.- Parameters:
virionsDiseaseCutoff
- The value for virionsDiseaseCutoff- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableInHostStochasticState
.- Returns:
- An immutable instance of InHostStochasticState
- Throws:
IllegalStateException
- if any required attributes are missing
-