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:
  • Method Details

    • getTime

      public int getTime()
      Specified by:
      getTime in interface InHostMarkovState
      Specified by:
      getTime in interface InHostModelState<MarkovStateModel>
      Returns:
      The value of the time attribute
    • getInfectionCaseRate

      public double getInfectionCaseRate()
      Specified by:
      getInfectionCaseRate in interface InHostMarkovState
      Returns:
      The value of the infectionCaseRate attribute
    • getInfectionHospitalisationRate

      public double getInfectionHospitalisationRate()
      Specified by:
      getInfectionHospitalisationRate in interface InHostMarkovState
      Returns:
      The value of the infectionHospitalisationRate attribute
    • getInfectionFatalityRate

      public double getInfectionFatalityRate()
      Specified by:
      getInfectionFatalityRate in interface InHostMarkovState
      Returns:
      The value of the infectionFatalityRate attribute
    • getDiseaseState

      public InHostMarkovState.DiseaseState getDiseaseState()
      Specified by:
      getDiseaseState in interface InHostMarkovState
      Returns:
      The value of the diseaseState attribute
    • getSymptomState

      public InHostMarkovState.SymptomState getSymptomState()
      Specified by:
      getSymptomState in interface InHostMarkovState
      Returns:
      The value of the symptomState attribute
    • getMachine

      public ImmutableInHostMarkovStateMachine getMachine()
      Specified by:
      getMachine in interface InHostMarkovState
      Returns:
      The value of the machine attribute
    • getNormalisedSeverity

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

      public final ImmutableInHostMarkovState 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
    • withInfectionCaseRate

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

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

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

      public final ImmutableInHostMarkovState withDiseaseState(InHostMarkovState.DiseaseState value)
      Copy the current immutable object by setting a value for the diseaseState attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for diseaseState
      Returns:
      A modified copy of the this object
    • withSymptomState

      public final ImmutableInHostMarkovState withSymptomState(InHostMarkovState.SymptomState value)
      Copy the current immutable object by setting a value for the symptomState attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for symptomState
      Returns:
      A modified copy of the this object
    • withMachine

      Copy the current immutable object by setting a value for the machine attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for machine
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableInHostMarkovState 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: time, infectionCaseRate, infectionHospitalisationRate, infectionFatalityRate, diseaseState, symptomState, machine, normalisedSeverity.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableInHostMarkovState copyOf(InHostMarkovState instance)
      Creates an immutable copy of a InHostMarkovState 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 for ImmutableInHostMarkovState.prefilled with attibute values of this instance to easily create modified copies.
      Returns:
      A new ImmutableInHostMarkovState builder with attributes of this instance
    • builder

      public static ImmutableInHostMarkovState.Builder builder()
      Creates a builder for ImmutableInHostMarkovState.
       ImmutableInHostMarkovState.builder()
          .setTime(int) // required time
          .setInfectionCaseRate(double) // required infectionCaseRate
          .setInfectionHospitalisationRate(double) // required infectionHospitalisationRate
          .setInfectionFatalityRate(double) // required infectionFatalityRate
          .setDiseaseState(io.github.ai4ci.abm.inhost.InHostMarkovState.DiseaseState) // required diseaseState
          .setSymptomState(io.github.ai4ci.abm.inhost.InHostMarkovState.SymptomState) // required symptomState
          .setMachine(io.github.ai4ci.abm.inhost.InHostMarkovState.InHostMarkovStateMachine) // required machine
          .build();
       
      Returns:
      A new ImmutableInHostMarkovState builder