Class ImmutablePersonStateCSV

java.lang.Object
io.github.ai4ci.output.ImmutablePersonStateCSV
All Implemented Interfaces:
CSVWriter.Writeable, CommonCSV.Execution, CommonCSV.Model, CommonCSV.State, PersonStateCSV

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

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

  • Method Details

    • getModelName

      public String getModelName()
      Specified by:
      getModelName in interface CommonCSV.Model
      Returns:
      The value of the modelName attribute
    • getExperimentName

      public String getExperimentName()
      Specified by:
      getExperimentName in interface CommonCSV.Model
      Returns:
      The value of the experimentName attribute
    • getModelReplica

      public int getModelReplica()
      Specified by:
      getModelReplica in interface CommonCSV.Execution
      Returns:
      The value of the modelReplica attribute
    • getExperimentReplica

      public int getExperimentReplica()
      Specified by:
      getExperimentReplica in interface CommonCSV.Execution
      Returns:
      The value of the experimentReplica attribute
    • getTime

      public int getTime()
      Specified by:
      getTime in interface CommonCSV.State
      Returns:
      The value of the time attribute
    • getPersonId

      public int getPersonId()
      Specified by:
      getPersonId in interface PersonStateCSV
      Returns:
      The value of the personId attribute
    • getBehaviour

      public String getBehaviour()
      Specified by:
      getBehaviour in interface PersonStateCSV
      Returns:
      The value of the behaviour attribute
    • isInfectious

      public boolean isInfectious()
      Specified by:
      isInfectious in interface PersonStateCSV
      Returns:
      The value of the infectious attribute
    • isSymptomatic

      public boolean isSymptomatic()
      Specified by:
      isSymptomatic in interface PersonStateCSV
      Returns:
      The value of the symptomatic attribute
    • isRequiringHospitalisation

      public boolean isRequiringHospitalisation()
      Specified by:
      isRequiringHospitalisation in interface PersonStateCSV
      Returns:
      The value of the requiringHospitalisation attribute
    • isDead

      public boolean isDead()
      Specified by:
      isDead in interface PersonStateCSV
      Returns:
      The value of the dead attribute
    • getNormalisedSeverity

      public double getNormalisedSeverity()
      Specified by:
      getNormalisedSeverity in interface PersonStateCSV
      Returns:
      The value of the normalisedSeverity attribute
    • getNormalisedViralLoad

      public double getNormalisedViralLoad()
      Specified by:
      getNormalisedViralLoad in interface PersonStateCSV
      Returns:
      The value of the normalisedViralLoad attribute
    • getContactExposure

      public double getContactExposure()
      Specified by:
      getContactExposure in interface PersonStateCSV
      Returns:
      The value of the contactExposure attribute
    • getPresumedLocalPrevalence

      public double getPresumedLocalPrevalence()
      Specified by:
      getPresumedLocalPrevalence in interface PersonStateCSV
      Returns:
      The value of the presumedLocalPrevalence attribute
    • getTrueLocalPrevalence

      public double getTrueLocalPrevalence()
      Specified by:
      getTrueLocalPrevalence in interface PersonStateCSV
      Returns:
      The value of the trueLocalPrevalence attribute
    • getProbabilityInfectiousToday

      public double getProbabilityInfectiousToday()
      Specified by:
      getProbabilityInfectiousToday in interface PersonStateCSV
      Returns:
      The value of the probabilityInfectiousToday attribute
    • getLogOddsInfectiousToday

      public double getLogOddsInfectiousToday()
      Specified by:
      getLogOddsInfectiousToday in interface PersonStateCSV
      Returns:
      The value of the logOddsInfectiousToday attribute
    • getContactCount

      public long getContactCount()
      Specified by:
      getContactCount in interface PersonStateCSV
      Returns:
      The value of the contactCount attribute
    • getExposureCount

      public long getExposureCount()
      Specified by:
      getExposureCount in interface PersonStateCSV
      Returns:
      The value of the exposureCount attribute
    • isIncidentInfection

      public boolean isIncidentInfection()
      Specified by:
      isIncidentInfection in interface PersonStateCSV
      Returns:
      The value of the incidentInfection attribute
    • withModelName

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

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

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

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

      public final ImmutablePersonStateCSV 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
    • withPersonId

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

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

      public final ImmutablePersonStateCSV withInfectious(boolean value)
      Copy the current immutable object by setting a value for the infectious attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for infectious
      Returns:
      A modified copy of the this object
    • withSymptomatic

      public final ImmutablePersonStateCSV withSymptomatic(boolean value)
      Copy the current immutable object by setting a value for the symptomatic attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for symptomatic
      Returns:
      A modified copy of the this object
    • withRequiringHospitalisation

      public final ImmutablePersonStateCSV withRequiringHospitalisation(boolean value)
      Copy the current immutable object by setting a value for the requiringHospitalisation attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for requiringHospitalisation
      Returns:
      A modified copy of the this object
    • withDead

      public final ImmutablePersonStateCSV withDead(boolean value)
      Copy the current immutable object by setting a value for the dead attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for dead
      Returns:
      A modified copy of the this object
    • withNormalisedSeverity

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

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

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

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

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

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

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

      public final ImmutablePersonStateCSV withContactCount(long value)
      Copy the current immutable object by setting a value for the contactCount attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for contactCount
      Returns:
      A modified copy of the this object
    • withExposureCount

      public final ImmutablePersonStateCSV withExposureCount(long value)
      Copy the current immutable object by setting a value for the exposureCount attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for exposureCount
      Returns:
      A modified copy of the this object
    • withIncidentInfection

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutablePersonStateCSV 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: modelName, experimentName, modelReplica, experimentReplica, time, personId, behaviour, infectious, symptomatic, requiringHospitalisation, dead, normalisedSeverity, normalisedViralLoad, contactExposure, presumedLocalPrevalence, trueLocalPrevalence, probabilityInfectiousToday, logOddsInfectiousToday, contactCount, exposureCount, incidentInfection.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

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

      public static ImmutablePersonStateCSV.Builder builder()
      Creates a builder for ImmutablePersonStateCSV.
       ImmutablePersonStateCSV.builder()
          .setModelName(String) // required modelName
          .setExperimentName(String) // required experimentName
          .setModelReplica(int) // required modelReplica
          .setExperimentReplica(int) // required experimentReplica
          .setTime(int) // required time
          .setPersonId(int) // required personId
          .setBehaviour(String) // required behaviour
          .setInfectious(boolean) // required infectious
          .setSymptomatic(boolean) // required symptomatic
          .setRequiringHospitalisation(boolean) // required requiringHospitalisation
          .setDead(boolean) // required dead
          .setNormalisedSeverity(double) // required normalisedSeverity
          .setNormalisedViralLoad(double) // required normalisedViralLoad
          .setContactExposure(double) // required contactExposure
          .setPresumedLocalPrevalence(double) // required presumedLocalPrevalence
          .setTrueLocalPrevalence(double) // required trueLocalPrevalence
          .setProbabilityInfectiousToday(double) // required probabilityInfectiousToday
          .setLogOddsInfectiousToday(double) // required logOddsInfectiousToday
          .setContactCount(long) // required contactCount
          .setExposureCount(long) // required exposureCount
          .setIncidentInfection(boolean) // required incidentInfection
          .build();
       
      Returns:
      A new ImmutablePersonStateCSV builder