Package io.github.ai4ci.abm.inhost
Class ImmutableBiPhasicLogistic.Builder
java.lang.Object
io.github.ai4ci.abm.inhost.ImmutableBiPhasicLogistic.Builder
- Enclosing class:
- ImmutableBiPhasicLogistic
Builds instances of type
ImmutableBiPhasicLogistic
.
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 newImmutableBiPhasicLogistic
.from
(ExposureModel.BiPhasicLogistic instance) Fill a builder with attribute values from the providedBiPhasicLogistic
instance.setDecayRate
(double decayRate) Initializes the value for thedecayRate
attribute.setDecayTime
(double decayTime) Initializes the value for thedecayTime
attribute.setGrowthRate
(double growthRate) Initializes the value for thegrowthRate
attribute.setGrowthTime
(double growthTime) Initializes the value for thegrowthTime
attribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableBiPhasicLogistic.Builder from(ExposureModel.BiPhasicLogistic instance) Fill a builder with attribute values from the providedBiPhasicLogistic
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
-
setGrowthRate
@CanIgnoreReturnValue public final ImmutableBiPhasicLogistic.Builder setGrowthRate(double growthRate) Initializes the value for thegrowthRate
attribute.- Parameters:
growthRate
- The value for growthRate- Returns:
this
builder for use in a chained invocation
-
setGrowthTime
@CanIgnoreReturnValue public final ImmutableBiPhasicLogistic.Builder setGrowthTime(double growthTime) Initializes the value for thegrowthTime
attribute.- Parameters:
growthTime
- The value for growthTime- Returns:
this
builder for use in a chained invocation
-
setDecayRate
Initializes the value for thedecayRate
attribute.- Parameters:
decayRate
- The value for decayRate- Returns:
this
builder for use in a chained invocation
-
setDecayTime
Initializes the value for thedecayTime
attribute.- Parameters:
decayTime
- The value for decayTime- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableBiPhasicLogistic
.- Returns:
- An immutable instance of BiPhasicLogistic
- Throws:
IllegalStateException
- if any required attributes are missing
-