Package io.github.ai4ci.config.inhost
Class ImmutableMarkovStateModel
java.lang.Object
io.github.ai4ci.config.inhost.ImmutableMarkovStateModel
- All Implemented Interfaces:
DemographicAdjustment.Markov<Abstraction.Distribution,
,Double> InHostConfiguration
,MarkovStateModel
,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableMarkovStateModel
extends Object
implements MarkovStateModel
Immutable implementation of
MarkovStateModel
.
Use the builder to create immutable instances:
ImmutableMarkovStateModel.builder()
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableMarkovStateModel
.Nested classes/interfaces inherited from interface io.github.ai4ci.config.inhost.MarkovStateModel
MarkovStateModel._PartialMarkovStateModel
-
Field Summary
Fields inherited from interface io.github.ai4ci.config.inhost.InHostConfiguration
LIMIT, log
Fields inherited from interface io.github.ai4ci.config.inhost.MarkovStateModel
DEFAULT
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableMarkovStateModel
.static ImmutableMarkovStateModel
copyOf
(MarkovStateModel instance) Creates an immutable copy of aMarkovStateModel
value.boolean
This instance is equal to all instances ofImmutableMarkovStateModel
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:incubationPeriod
,infectiousDuration
,symptomDuration
,immuneWaningHalfLife
.Creates a builder forImmutableMarkovStateModel
.prefilled with attibute values ofthis
instance to easily create modified copies.toString()
Prints the immutable valueMarkovStateModel
with attribute values.Copy the current immutable object by setting a value for theimmuneWaningHalfLife
attribute.Copy the current immutable object by setting a value for theincubationPeriod
attribute.Copy the current immutable object by setting a value for theinfectiousDuration
attribute.Copy the current immutable object by setting a value for thesymptomDuration
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.ai4ci.config.inhost.MarkovStateModel
getSeverityFatalityCutoff, getSeverityHospitalisationCutoff, getSeveritySymptomsCutoff
-
Method Details
-
getIncubationPeriod
- Specified by:
getIncubationPeriod
in interfaceDemographicAdjustment.Markov<Abstraction.Distribution,
Double> - Specified by:
getIncubationPeriod
in interfaceMarkovStateModel
- Returns:
- The value of the
incubationPeriod
attribute
-
getInfectiousDuration
- Specified by:
getInfectiousDuration
in interfaceDemographicAdjustment.Markov<Abstraction.Distribution,
Double> - Specified by:
getInfectiousDuration
in interfaceMarkovStateModel
- Returns:
- The value of the
infectiousDuration
attribute
-
getSymptomDuration
- Specified by:
getSymptomDuration
in interfaceDemographicAdjustment.Markov<Abstraction.Distribution,
Double> - Specified by:
getSymptomDuration
in interfaceMarkovStateModel
- Returns:
- The value of the
symptomDuration
attribute
-
getImmuneWaningHalfLife
- Specified by:
getImmuneWaningHalfLife
in interfaceDemographicAdjustment.Markov<Abstraction.Distribution,
Double> - Specified by:
getImmuneWaningHalfLife
in interfaceMarkovStateModel
- Returns:
- The value of the
immuneWaningHalfLife
attribute
-
withIncubationPeriod
Copy the current immutable object by setting a value for theincubationPeriod
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for incubationPeriod- Returns:
- A modified copy of the
this
object
-
withInfectiousDuration
Copy the current immutable object by setting a value for theinfectiousDuration
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for infectiousDuration- Returns:
- A modified copy of the
this
object
-
withSymptomDuration
Copy the current immutable object by setting a value for thesymptomDuration
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for symptomDuration- Returns:
- A modified copy of the
this
object
-
withImmuneWaningHalfLife
Copy the current immutable object by setting a value for theimmuneWaningHalfLife
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for immuneWaningHalfLife- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableMarkovStateModel
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:incubationPeriod
,infectiousDuration
,symptomDuration
,immuneWaningHalfLife
. -
toString
Prints the immutable valueMarkovStateModel
with attribute values. -
copyOf
Creates an immutable copy of aMarkovStateModel
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable MarkovStateModel instance
-
toBuilder
Creates a builder forImmutableMarkovStateModel
.prefilled with attibute values ofthis
instance to easily create modified copies.- Returns:
- A new ImmutableMarkovStateModel builder with attributes of
this
instance
-
builder
Creates a builder forImmutableMarkovStateModel
.ImmutableMarkovStateModel.builder() .setIncubationPeriod(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // required
incubationPeriod
.setInfectiousDuration(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // requiredinfectiousDuration
.setSymptomDuration(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // requiredsymptomDuration
.setImmuneWaningHalfLife(io.github.ai4ci.abm.mechanics.Abstraction.Distribution) // requiredimmuneWaningHalfLife
.build();- Returns:
- A new ImmutableMarkovStateModel builder
-