Package io.github.ai4ci.abm.inhost
Class ImmutableInHostMarkovState
java.lang.Object
io.github.ai4ci.abm.inhost.ImmutableInHostMarkovState
- All Implemented Interfaces:
InHostMarkovState
,InHostModelState<MarkovStateModel>
,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableInHostMarkovState
extends Object
implements InHostMarkovState
Immutable implementation of
InHostMarkovState
.
Use the builder to create immutable instances:
ImmutableInHostMarkovState.builder()
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableInHostMarkovState
.Nested classes/interfaces inherited from interface io.github.ai4ci.abm.inhost.InHostMarkovState
InHostMarkovState.DiseaseState, InHostMarkovState.InHostMarkovStateMachine, InHostMarkovState.SymptomState
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableInHostMarkovState
.static ImmutableInHostMarkovState
copyOf
(InHostMarkovState instance) Creates an immutable copy of aInHostMarkovState
value.boolean
This instance is equal to all instances ofImmutableInHostMarkovState
that have equal attribute values.double
double
double
double
int
getTime()
int
hashCode()
Computes a hash code from attributes:time
,infectionCaseRate
,infectionHospitalisationRate
,infectionFatalityRate
,diseaseState
,symptomState
,machine
,normalisedSeverity
.Creates a builder forImmutableInHostMarkovState
.prefilled with attibute values ofthis
instance to easily create modified copies.toString()
Prints the immutable valueInHostMarkovState
with attribute values.Copy the current immutable object by setting a value for thediseaseState
attribute.withInfectionCaseRate
(double value) Copy the current immutable object by setting a value for theinfectionCaseRate
attribute.withInfectionFatalityRate
(double value) Copy the current immutable object by setting a value for theinfectionFatalityRate
attribute.withInfectionHospitalisationRate
(double value) Copy the current immutable object by setting a value for theinfectionHospitalisationRate
attribute.Copy the current immutable object by setting a value for themachine
attribute.Copy the current immutable object by setting a value for thesymptomState
attribute.withTime
(int value) Copy the current immutable object by setting a value for thetime
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.ai4ci.abm.inhost.InHostMarkovState
getImmuneActivity, getNormalisedViralLoad, isInfected, update
Methods inherited from interface io.github.ai4ci.abm.inhost.InHostModelState
update
-
Method Details
-
getTime
public int getTime()- Specified by:
getTime
in interfaceInHostMarkovState
- Specified by:
getTime
in interfaceInHostModelState<MarkovStateModel>
- Returns:
- The value of the
time
attribute
-
getInfectionCaseRate
public double getInfectionCaseRate()- Specified by:
getInfectionCaseRate
in interfaceInHostMarkovState
- Returns:
- The value of the
infectionCaseRate
attribute
-
getInfectionHospitalisationRate
public double getInfectionHospitalisationRate()- Specified by:
getInfectionHospitalisationRate
in interfaceInHostMarkovState
- Returns:
- The value of the
infectionHospitalisationRate
attribute
-
getInfectionFatalityRate
public double getInfectionFatalityRate()- Specified by:
getInfectionFatalityRate
in interfaceInHostMarkovState
- Returns:
- The value of the
infectionFatalityRate
attribute
-
getDiseaseState
- Specified by:
getDiseaseState
in interfaceInHostMarkovState
- Returns:
- The value of the
diseaseState
attribute
-
getSymptomState
- Specified by:
getSymptomState
in interfaceInHostMarkovState
- Returns:
- The value of the
symptomState
attribute
-
getMachine
- Specified by:
getMachine
in interfaceInHostMarkovState
- Returns:
- The value of the
machine
attribute
-
getNormalisedSeverity
public double getNormalisedSeverity()- Specified by:
getNormalisedSeverity
in interfaceInHostMarkovState
- Specified by:
getNormalisedSeverity
in interfaceInHostModelState<MarkovStateModel>
- Returns:
- The computed-at-construction value of the
normalisedSeverity
attribute
-
withTime
Copy the current immutable object by setting a value for thetime
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for time- Returns:
- A modified copy of the
this
object
-
withInfectionCaseRate
Copy the current immutable object by setting a value for theinfectionCaseRate
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for infectionCaseRate- Returns:
- A modified copy of the
this
object
-
withInfectionHospitalisationRate
Copy the current immutable object by setting a value for theinfectionHospitalisationRate
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for infectionHospitalisationRate- Returns:
- A modified copy of the
this
object
-
withInfectionFatalityRate
Copy the current immutable object by setting a value for theinfectionFatalityRate
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for infectionFatalityRate- Returns:
- A modified copy of the
this
object
-
withDiseaseState
Copy the current immutable object by setting a value for thediseaseState
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for diseaseState- Returns:
- A modified copy of the
this
object
-
withSymptomState
Copy the current immutable object by setting a value for thesymptomState
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for symptomState- Returns:
- A modified copy of the
this
object
-
withMachine
public final ImmutableInHostMarkovState withMachine(InHostMarkovState.InHostMarkovStateMachine value) Copy the current immutable object by setting a value for themachine
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for machine- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableInHostMarkovState
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:time
,infectionCaseRate
,infectionHospitalisationRate
,infectionFatalityRate
,diseaseState
,symptomState
,machine
,normalisedSeverity
. -
toString
Prints the immutable valueInHostMarkovState
with attribute values. -
copyOf
Creates an immutable copy of aInHostMarkovState
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 InHostMarkovState instance
-
toBuilder
Creates a builder forImmutableInHostMarkovState
.prefilled with attibute values ofthis
instance to easily create modified copies.- Returns:
- A new ImmutableInHostMarkovState builder with attributes of
this
instance
-
builder
Creates a builder forImmutableInHostMarkovState
.ImmutableInHostMarkovState.builder() .setTime(int) // required
time
.setInfectionCaseRate(double) // requiredinfectionCaseRate
.setInfectionHospitalisationRate(double) // requiredinfectionHospitalisationRate
.setInfectionFatalityRate(double) // requiredinfectionFatalityRate
.setDiseaseState(io.github.ai4ci.abm.inhost.InHostMarkovState.DiseaseState) // requireddiseaseState
.setSymptomState(io.github.ai4ci.abm.inhost.InHostMarkovState.SymptomState) // requiredsymptomState
.setMachine(io.github.ai4ci.abm.inhost.InHostMarkovState.InHostMarkovStateMachine) // requiredmachine
.build();- Returns:
- A new ImmutableInHostMarkovState builder
-