Class ImmutablePersonBaseline

java.lang.Object
io.github.ai4ci.abm.ImmutablePersonBaseline
All Implemented Interfaces:
PersonBaseline, Serializable

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

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

See Also:
  • Method Details

    • getMobilityBaseline

      public Double getMobilityBaseline()
      A probability of contact of another person in the social network.
      Specified by:
      getMobilityBaseline in interface PersonBaseline
      Returns:
    • getTransmissibilityModifier

      public Double getTransmissibilityModifier()
      Am odds ratio on the probability of transmission to someone else given an infectious contact that reflects intrinsic host specific factors that don't vary with time. Inherent susceptibility due to e.g. age.
      Specified by:
      getTransmissibilityModifier in interface PersonBaseline
      Returns:
    • getComplianceBaseline

      public Double getComplianceBaseline()
      Specified by:
      getComplianceBaseline in interface PersonBaseline
      Returns:
      The value of the complianceBaseline attribute
    • getSymptomSpecificity

      public Double getSymptomSpecificity()
      Specified by:
      getSymptomSpecificity in interface PersonBaseline
      Returns:
      The value of the symptomSpecificity attribute
    • getSymptomSensitivity

      public Double getSymptomSensitivity()
      Specified by:
      getSymptomSensitivity in interface PersonBaseline
      Returns:
      The value of the symptomSensitivity attribute
    • getDefaultBehaviourState

      public StateMachine.BehaviourState getDefaultBehaviourState()
      Specified by:
      getDefaultBehaviourState in interface PersonBaseline
      Returns:
      The value of the defaultBehaviourState attribute
    • getSelfIsolationDepth

      public Double getSelfIsolationDepth()
      The minimum mobility modifier that a person will experience. This is an odds ratio that is applied to their baseline probability
      Specified by:
      getSelfIsolationDepth in interface PersonBaseline
      Returns:
    • getAppUseProbability

      public Double getAppUseProbability()
      Specified by:
      getAppUseProbability in interface PersonBaseline
      Returns:
      The value of the appUseProbability attribute
    • withMobilityBaseline

      public final ImmutablePersonBaseline withMobilityBaseline(Double value)
      Copy the current immutable object by setting a value for the mobilityBaseline attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for mobilityBaseline
      Returns:
      A modified copy of the this object
    • withTransmissibilityModifier

      public final ImmutablePersonBaseline withTransmissibilityModifier(Double value)
      Copy the current immutable object by setting a value for the transmissibilityModifier attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for transmissibilityModifier
      Returns:
      A modified copy of the this object
    • withComplianceBaseline

      public final ImmutablePersonBaseline withComplianceBaseline(Double value)
      Copy the current immutable object by setting a value for the complianceBaseline attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for complianceBaseline
      Returns:
      A modified copy of the this object
    • withSymptomSpecificity

      public final ImmutablePersonBaseline withSymptomSpecificity(Double value)
      Copy the current immutable object by setting a value for the symptomSpecificity attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for symptomSpecificity
      Returns:
      A modified copy of the this object
    • withSymptomSensitivity

      public final ImmutablePersonBaseline withSymptomSensitivity(Double value)
      Copy the current immutable object by setting a value for the symptomSensitivity attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for symptomSensitivity
      Returns:
      A modified copy of the this object
    • withDefaultBehaviourState

      public final ImmutablePersonBaseline withDefaultBehaviourState(StateMachine.BehaviourState value)
      Copy the current immutable object by setting a value for the defaultBehaviourState attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for defaultBehaviourState
      Returns:
      A modified copy of the this object
    • withSelfIsolationDepth

      public final ImmutablePersonBaseline withSelfIsolationDepth(Double value)
      Copy the current immutable object by setting a value for the selfIsolationDepth attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for selfIsolationDepth
      Returns:
      A modified copy of the this object
    • withAppUseProbability

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutablePersonBaseline 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: mobilityBaseline, transmissibilityModifier, complianceBaseline, symptomSpecificity, symptomSensitivity, defaultBehaviourState, selfIsolationDepth, appUseProbability.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public ImmutablePersonBaseline.Builder toBuilder()
      Creates a builder for ImmutablePersonBaseline.prefilled with attibute values of this instance to easily create modified copies.
      Returns:
      A new ImmutablePersonBaseline builder with attributes of this instance
    • builder

      public static ImmutablePersonBaseline.Builder builder()
      Creates a builder for ImmutablePersonBaseline.
       ImmutablePersonBaseline.builder()
          .setMobilityBaseline(Double) // required mobilityBaseline
          .setTransmissibilityModifier(Double) // required transmissibilityModifier
          .setComplianceBaseline(Double) // required complianceBaseline
          .setSymptomSpecificity(Double) // required symptomSpecificity
          .setSymptomSensitivity(Double) // required symptomSensitivity
          .setDefaultBehaviourState(io.github.ai4ci.abm.mechanics.StateMachine.BehaviourState) // required defaultBehaviourState
          .setSelfIsolationDepth(Double) // required selfIsolationDepth
          .setAppUseProbability(Double) // required appUseProbability
          .build();
       
      Returns:
      A new ImmutablePersonBaseline builder