Package io.github.ai4ci.abm.inhost
Class ImmutableInHostPhenomenologicalState
java.lang.Object
io.github.ai4ci.abm.inhost.ImmutableInHostPhenomenologicalState
- All Implemented Interfaces:
InHostModelState<PhenomenologicalModel>
,InHostPhenomenologicalState
,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableInHostPhenomenologicalState
extends Object
implements InHostPhenomenologicalState
Immutable implementation of
InHostPhenomenologicalState
.
Use the builder to create immutable instances:
ImmutableInHostPhenomenologicalState.builder()
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableInHostPhenomenologicalState
. -
Field Summary
Fields inherited from interface io.github.ai4ci.abm.inhost.InHostPhenomenologicalState
log
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableInHostPhenomenologicalState
.copyOf
(InHostPhenomenologicalState instance) Creates an immutable copy of aInHostPhenomenologicalState
value.boolean
This instance is equal to all instances ofImmutableInHostPhenomenologicalState
that have equal attribute values.com.google.common.collect.ImmutableList<ExposureModel>
double
double
int
getTime()
double
int
hashCode()
Computes a hash code from attributes:viralLoadModel
,immunityModel
,exposures
,infectiousnessCutoff
,time
,viralLoad
,immuneActivity
.Creates a builder forImmutableInHostPhenomenologicalState
.prefilled with attibute values ofthis
instance to easily create modified copies.toString()
Prints the immutable valueInHostPhenomenologicalState
with attribute values.withExposures
(ExposureModel... elements) Copy the current immutable object with elements that replace the content ofexposures
.withExposures
(Iterable<? extends ExposureModel> elements) Copy the current immutable object with elements that replace the content ofexposures
.Copy the current immutable object by setting a value for theimmunityModel
attribute.withInfectiousnessCutoff
(double value) Copy the current immutable object by setting a value for theinfectiousnessCutoff
attribute.withTime
(int value) Copy the current immutable object by setting a value for thetime
attribute.Copy the current immutable object by setting a value for theviralLoadModel
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.InHostModelState
update
Methods inherited from interface io.github.ai4ci.abm.inhost.InHostPhenomenologicalState
getNormalisedSeverity, getNormalisedViralLoad, isInfected, update
-
Method Details
-
getViralLoadModel
- Specified by:
getViralLoadModel
in interfaceInHostPhenomenologicalState
- Returns:
- The value of the
viralLoadModel
attribute
-
getImmunityModel
- Specified by:
getImmunityModel
in interfaceInHostPhenomenologicalState
- Returns:
- The value of the
immunityModel
attribute
-
getExposures
- Specified by:
getExposures
in interfaceInHostPhenomenologicalState
- Returns:
- The value of the
exposures
attribute
-
getInfectiousnessCutoff
public double getInfectiousnessCutoff()- Specified by:
getInfectiousnessCutoff
in interfaceInHostPhenomenologicalState
- Returns:
- The value of the
infectiousnessCutoff
attribute
-
getTime
public int getTime()- Specified by:
getTime
in interfaceInHostModelState<PhenomenologicalModel>
- Specified by:
getTime
in interfaceInHostPhenomenologicalState
- Returns:
- The value of the
time
attribute
-
getViralLoad
public double getViralLoad()- Specified by:
getViralLoad
in interfaceInHostPhenomenologicalState
- Returns:
- The computed-at-construction value of the
viralLoad
attribute
-
getImmuneActivity
public double getImmuneActivity()- Specified by:
getImmuneActivity
in interfaceInHostModelState<PhenomenologicalModel>
- Specified by:
getImmuneActivity
in interfaceInHostPhenomenologicalState
- Returns:
- The computed-at-construction value of the
immuneActivity
attribute
-
withViralLoadModel
public final ImmutableInHostPhenomenologicalState withViralLoadModel(ExposureModel.BiPhasicLogistic value) Copy the current immutable object by setting a value for theviralLoadModel
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for viralLoadModel- Returns:
- A modified copy of the
this
object
-
withImmunityModel
public final ImmutableInHostPhenomenologicalState withImmunityModel(ExposureModel.BiPhasicLogistic value) Copy the current immutable object by setting a value for theimmunityModel
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for immunityModel- Returns:
- A modified copy of the
this
object
-
withExposures
Copy the current immutable object with elements that replace the content ofexposures
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withExposures
public final ImmutableInHostPhenomenologicalState withExposures(Iterable<? extends ExposureModel> elements) Copy the current immutable object with elements that replace the content ofexposures
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of exposures elements to set- Returns:
- A modified copy of
this
object
-
withInfectiousnessCutoff
Copy the current immutable object by setting a value for theinfectiousnessCutoff
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for infectiousnessCutoff- Returns:
- A modified copy of the
this
object
-
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
-
equals
This instance is equal to all instances ofImmutableInHostPhenomenologicalState
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:viralLoadModel
,immunityModel
,exposures
,infectiousnessCutoff
,time
,viralLoad
,immuneActivity
. -
toString
Prints the immutable valueInHostPhenomenologicalState
with attribute values. -
copyOf
Creates an immutable copy of aInHostPhenomenologicalState
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 InHostPhenomenologicalState instance
-
toBuilder
Creates a builder forImmutableInHostPhenomenologicalState
.prefilled with attibute values ofthis
instance to easily create modified copies.- Returns:
- A new ImmutableInHostPhenomenologicalState builder with attributes of
this
instance
-
builder
Creates a builder forImmutableInHostPhenomenologicalState
.ImmutableInHostPhenomenologicalState.builder() .setViralLoadModel(io.github.ai4ci.abm.inhost.ExposureModel.BiPhasicLogistic) // required
viralLoadModel
.setImmunityModel(io.github.ai4ci.abm.inhost.ExposureModel.BiPhasicLogistic) // requiredimmunityModel
.addExposure|addAllExposures(io.github.ai4ci.abm.inhost.ExposureModel) //exposures
elements .setInfectiousnessCutoff(double) // requiredinfectiousnessCutoff
.setTime(int) // requiredtime
.build();- Returns:
- A new ImmutableInHostPhenomenologicalState builder
-