Class ImmutableInHostStochasticState

java.lang.Object
io.github.ai4ci.abm.inhost.ImmutableInHostStochasticState
All Implemented Interfaces:
InHostModelState<StochasticModel>, InHostStochasticState, Serializable

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableInHostStochasticState extends Object implements InHostStochasticState
Immutable implementation of InHostStochasticState.

Use the builder to create immutable instances: ImmutableInHostStochasticState.builder().

See Also:
  • Method Details

    • getTargets

      public int getTargets()
      Specified by:
      getTargets in interface InHostStochasticState
      Returns:
      The value of the targets attribute
    • getImmuneTargetRatio

      public double getImmuneTargetRatio()
      Specified by:
      getImmuneTargetRatio in interface InHostStochasticState
      Returns:
      The value of the immuneTargetRatio attribute
    • getImmuneActivationRate

      public double getImmuneActivationRate()
      Specified by:
      getImmuneActivationRate in interface InHostStochasticState
      Returns:
      The value of the immuneActivationRate attribute
    • getImmuneWaningRate

      public double getImmuneWaningRate()
      Specified by:
      getImmuneWaningRate in interface InHostStochasticState
      Returns:
      The value of the immuneWaningRate attribute
    • getInfectionCarrierProbability

      public double getInfectionCarrierProbability()
      Specified by:
      getInfectionCarrierProbability in interface InHostStochasticState
      Returns:
      The value of the infectionCarrierProbability attribute
    • getTargetRecoveryRate

      public double getTargetRecoveryRate()
      Specified by:
      getTargetRecoveryRate in interface InHostStochasticState
      Returns:
      The value of the targetRecoveryRate attribute
    • getTime

      public int getTime()
      Specified by:
      getTime in interface InHostModelState<StochasticModel>
      Specified by:
      getTime in interface InHostStochasticState
      Returns:
      The value of the time attribute
    • getVirions

      public int getVirions()
      Specified by:
      getVirions in interface InHostStochasticState
      Returns:
      The value of the virions attribute
    • getVirionsProduced

      public int getVirionsProduced()
      Specified by:
      getVirionsProduced in interface InHostStochasticState
      Returns:
      The value of the virionsProduced attribute
    • getTargetSusceptible

      public int getTargetSusceptible()
      Specified by:
      getTargetSusceptible in interface InHostStochasticState
      Returns:
      The value of the targetSusceptible attribute
    • getTargetExposed

      public int getTargetExposed()
      Specified by:
      getTargetExposed in interface InHostStochasticState
      Returns:
      The value of the targetExposed attribute
    • getTargetInfected

      public int getTargetInfected()
      Specified by:
      getTargetInfected in interface InHostStochasticState
      Returns:
      The value of the targetInfected attribute
    • getImmune

      public Integer getImmune()
      Specified by:
      getImmune in interface InHostStochasticState
      Returns:
      The value of the immune attribute
    • getImmunePriming

      public int getImmunePriming()
      Specified by:
      getImmunePriming in interface InHostStochasticState
      Returns:
      The value of the immunePriming attribute
    • getImmuneActive

      public int getImmuneActive()
      Specified by:
      getImmuneActive in interface InHostStochasticState
      Returns:
      The value of the immuneActive attribute
    • getBaselineViralReplicationRate

      public double getBaselineViralReplicationRate()
      Specified by:
      getBaselineViralReplicationRate in interface InHostStochasticState
      Returns:
      The value of the baselineViralReplicationRate attribute
    • getBaselineViralInfectionRate

      public double getBaselineViralInfectionRate()
      Specified by:
      getBaselineViralInfectionRate in interface InHostStochasticState
      Returns:
      The value of the baselineViralInfectionRate attribute
    • getVirionsDiseaseCutoff

      public int getVirionsDiseaseCutoff()
      Specified by:
      getVirionsDiseaseCutoff in interface InHostStochasticState
      Returns:
      The value of the virionsDiseaseCutoff attribute
    • getTargetRemoved

      public int getTargetRemoved()
      Specified by:
      getTargetRemoved in interface InHostStochasticState
      Returns:
      The computed-at-construction value of the targetRemoved attribute
    • getNormalisedViralLoad

      public double getNormalisedViralLoad()
      Specified by:
      getNormalisedViralLoad in interface InHostModelState<StochasticModel>
      Specified by:
      getNormalisedViralLoad in interface InHostStochasticState
      Returns:
      The computed-at-construction value of the normalisedViralLoad attribute
    • getNormalisedSeverity

      public double getNormalisedSeverity()
      Specified by:
      getNormalisedSeverity in interface InHostModelState<StochasticModel>
      Specified by:
      getNormalisedSeverity in interface InHostStochasticState
      Returns:
      The computed-at-construction value of the normalisedSeverity attribute
    • getImmuneActivity

      public double getImmuneActivity()
      Specified by:
      getImmuneActivity in interface InHostModelState<StochasticModel>
      Specified by:
      getImmuneActivity in interface InHostStochasticState
      Returns:
      The computed-at-construction value of the immuneActivity attribute
    • getImmuneDormant

      public int getImmuneDormant()
      Specified by:
      getImmuneDormant in interface InHostStochasticState
      Returns:
      The computed-at-construction value of the immuneDormant attribute
    • withTargets

      public final ImmutableInHostStochasticState withTargets(int value)
      Copy the current immutable object by setting a value for the targets attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for targets
      Returns:
      A modified copy of the this object
    • withImmuneTargetRatio

      public final ImmutableInHostStochasticState withImmuneTargetRatio(double value)
      Copy the current immutable object by setting a value for the immuneTargetRatio attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for immuneTargetRatio
      Returns:
      A modified copy of the this object
    • withImmuneActivationRate

      public final ImmutableInHostStochasticState withImmuneActivationRate(double value)
      Copy the current immutable object by setting a value for the immuneActivationRate attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for immuneActivationRate
      Returns:
      A modified copy of the this object
    • withImmuneWaningRate

      public final ImmutableInHostStochasticState withImmuneWaningRate(double value)
      Copy the current immutable object by setting a value for the immuneWaningRate attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for immuneWaningRate
      Returns:
      A modified copy of the this object
    • withInfectionCarrierProbability

      public final ImmutableInHostStochasticState withInfectionCarrierProbability(double value)
      Copy the current immutable object by setting a value for the infectionCarrierProbability attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for infectionCarrierProbability
      Returns:
      A modified copy of the this object
    • withTargetRecoveryRate

      public final ImmutableInHostStochasticState withTargetRecoveryRate(double value)
      Copy the current immutable object by setting a value for the targetRecoveryRate attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for targetRecoveryRate
      Returns:
      A modified copy of the this object
    • withTime

      public final ImmutableInHostStochasticState withTime(int value)
      Copy the current immutable object by setting a value for the time attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for time
      Returns:
      A modified copy of the this object
    • withVirions

      public final ImmutableInHostStochasticState withVirions(int value)
      Copy the current immutable object by setting a value for the virions attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for virions
      Returns:
      A modified copy of the this object
    • withVirionsProduced

      public final ImmutableInHostStochasticState withVirionsProduced(int value)
      Copy the current immutable object by setting a value for the virionsProduced attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for virionsProduced
      Returns:
      A modified copy of the this object
    • withTargetSusceptible

      public final ImmutableInHostStochasticState withTargetSusceptible(int value)
      Copy the current immutable object by setting a value for the targetSusceptible attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for targetSusceptible
      Returns:
      A modified copy of the this object
    • withTargetExposed

      public final ImmutableInHostStochasticState withTargetExposed(int value)
      Copy the current immutable object by setting a value for the targetExposed attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for targetExposed
      Returns:
      A modified copy of the this object
    • withTargetInfected

      public final ImmutableInHostStochasticState withTargetInfected(int value)
      Copy the current immutable object by setting a value for the targetInfected attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for targetInfected
      Returns:
      A modified copy of the this object
    • withImmune

      public final ImmutableInHostStochasticState withImmune(Integer value)
      Copy the current immutable object by setting a value for the immune attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for immune
      Returns:
      A modified copy of the this object
    • withImmunePriming

      public final ImmutableInHostStochasticState withImmunePriming(int value)
      Copy the current immutable object by setting a value for the immunePriming attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for immunePriming
      Returns:
      A modified copy of the this object
    • withImmuneActive

      public final ImmutableInHostStochasticState withImmuneActive(int value)
      Copy the current immutable object by setting a value for the immuneActive attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for immuneActive
      Returns:
      A modified copy of the this object
    • withBaselineViralReplicationRate

      public final ImmutableInHostStochasticState withBaselineViralReplicationRate(double value)
      Copy the current immutable object by setting a value for the baselineViralReplicationRate attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for baselineViralReplicationRate
      Returns:
      A modified copy of the this object
    • withBaselineViralInfectionRate

      public final ImmutableInHostStochasticState withBaselineViralInfectionRate(double value)
      Copy the current immutable object by setting a value for the baselineViralInfectionRate attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for baselineViralInfectionRate
      Returns:
      A modified copy of the this object
    • withVirionsDiseaseCutoff

      public final ImmutableInHostStochasticState withVirionsDiseaseCutoff(int value)
      Copy the current immutable object by setting a value for the virionsDiseaseCutoff attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for virionsDiseaseCutoff
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableInHostStochasticState that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: targets, immuneTargetRatio, immuneActivationRate, immuneWaningRate, infectionCarrierProbability, targetRecoveryRate, time, virions, virionsProduced, targetSusceptible, targetExposed, targetInfected, immune, immunePriming, immuneActive, baselineViralReplicationRate, baselineViralInfectionRate, virionsDiseaseCutoff, targetRemoved, normalisedViralLoad, normalisedSeverity, immuneActivity, immuneDormant.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value InHostStochasticState with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableInHostStochasticState copyOf(InHostStochasticState instance)
      Creates an immutable copy of a InHostStochasticState 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 InHostStochasticState instance
    • toBuilder

      Creates a builder for ImmutableInHostStochasticState.prefilled with attibute values of this instance to easily create modified copies.
      Returns:
      A new ImmutableInHostStochasticState builder with attributes of this instance
    • builder

      public static ImmutableInHostStochasticState.Builder builder()
      Creates a builder for ImmutableInHostStochasticState.
       ImmutableInHostStochasticState.builder()
          .setTargets(int) // required targets
          .setImmuneTargetRatio(double) // required immuneTargetRatio
          .setImmuneActivationRate(double) // required immuneActivationRate
          .setImmuneWaningRate(double) // required immuneWaningRate
          .setInfectionCarrierProbability(double) // required infectionCarrierProbability
          .setTargetRecoveryRate(double) // required targetRecoveryRate
          .setTime(int) // required time
          .setVirions(int) // required virions
          .setVirionsProduced(int) // required virionsProduced
          .setTargetSusceptible(int) // required targetSusceptible
          .setTargetExposed(int) // required targetExposed
          .setTargetInfected(int) // required targetInfected
          .setImmune(Integer) // optional immune
          .setImmunePriming(int) // required immunePriming
          .setImmuneActive(int) // required immuneActive
          .setBaselineViralReplicationRate(double) // required baselineViralReplicationRate
          .setBaselineViralInfectionRate(double) // required baselineViralInfectionRate
          .setVirionsDiseaseCutoff(int) // required virionsDiseaseCutoff
          .build();
       
      Returns:
      A new ImmutableInHostStochasticState builder