Class ImmutableOutbreakCSV

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

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

Use the builder to create immutable instances: ImmutableOutbreakCSV.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
    • getIncidence

      public long getIncidence()
      Specified by:
      getIncidence in interface OutbreakCSV
      Returns:
      The value of the incidence attribute
    • getPrevalence

      public double getPrevalence()
      Specified by:
      getPrevalence in interface OutbreakCSV
      Returns:
      The value of the prevalence attribute
    • getCumulativeInfections

      public long getCumulativeInfections()
      Specified by:
      getCumulativeInfections in interface OutbreakCSV
      Returns:
      The value of the cumulativeInfections attribute
    • getCumulativeDeaths

      public long getCumulativeDeaths()
      Specified by:
      getCumulativeDeaths in interface OutbreakCSV
      Returns:
      The value of the cumulativeDeaths attribute
    • getHospitalisedCount

      public long getHospitalisedCount()
      Specified by:
      getHospitalisedCount in interface OutbreakCSV
      Returns:
      The value of the hospitalisedCount attribute
    • getInfectedCount

      public long getInfectedCount()
      Specified by:
      getInfectedCount in interface OutbreakCSV
      Returns:
      The value of the infectedCount attribute
    • getSymptomaticCount

      public long getSymptomaticCount()
      Specified by:
      getSymptomaticCount in interface OutbreakCSV
      Returns:
      The value of the symptomaticCount attribute
    • getAverageMobility

      public double getAverageMobility()
      Specified by:
      getAverageMobility in interface OutbreakCSV
      Returns:
      The value of the averageMobility attribute
    • getAverageViralLoad

      public double getAverageViralLoad()
      Specified by:
      getAverageViralLoad in interface OutbreakCSV
      Returns:
      The value of the averageViralLoad attribute
    • getAverageCompliance

      public double getAverageCompliance()
      Specified by:
      getAverageCompliance in interface OutbreakCSV
      Returns:
      The value of the averageCompliance attribute
    • getTestPositivesByResultDate

      public long getTestPositivesByResultDate()
      Specified by:
      getTestPositivesByResultDate in interface OutbreakCSV
      Returns:
      The value of the testPositivesByResultDate attribute
    • getTestNegativesByResultDate

      public long getTestNegativesByResultDate()
      Specified by:
      getTestNegativesByResultDate in interface OutbreakCSV
      Returns:
      The value of the testNegativesByResultDate attribute
    • getPresumedTestPositivePrevalence

      public double getPresumedTestPositivePrevalence()
      Specified by:
      getPresumedTestPositivePrevalence in interface OutbreakCSV
      Returns:
      The value of the presumedTestPositivePrevalence attribute
    • getRtEffective

      public double getRtEffective()
      Specified by:
      getRtEffective in interface OutbreakCSV
      Returns:
      The value of the rtEffective attribute
    • getPolicy

      public String getPolicy()
      Specified by:
      getPolicy in interface OutbreakCSV
      Returns:
      The value of the policy attribute
    • withModelName

      public final ImmutableOutbreakCSV 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 ImmutableOutbreakCSV 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 ImmutableOutbreakCSV 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 ImmutableOutbreakCSV 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 ImmutableOutbreakCSV 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
    • withIncidence

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableOutbreakCSV 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, incidence, prevalence, cumulativeInfections, cumulativeDeaths, hospitalisedCount, infectedCount, symptomaticCount, averageMobility, averageViralLoad, averageCompliance, testPositivesByResultDate, testNegativesByResultDate, presumedTestPositivePrevalence, rtEffective, policy.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

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

      public static ImmutableOutbreakCSV.Builder builder()
      Creates a builder for ImmutableOutbreakCSV.
       ImmutableOutbreakCSV.builder()
          .setModelName(String) // required modelName
          .setExperimentName(String) // required experimentName
          .setModelReplica(int) // required modelReplica
          .setExperimentReplica(int) // required experimentReplica
          .setTime(int) // required time
          .setIncidence(long) // required incidence
          .setPrevalence(double) // required prevalence
          .setCumulativeInfections(long) // required cumulativeInfections
          .setCumulativeDeaths(long) // required cumulativeDeaths
          .setHospitalisedCount(long) // required hospitalisedCount
          .setInfectedCount(long) // required infectedCount
          .setSymptomaticCount(long) // required symptomaticCount
          .setAverageMobility(double) // required averageMobility
          .setAverageViralLoad(double) // required averageViralLoad
          .setAverageCompliance(double) // required averageCompliance
          .setTestPositivesByResultDate(long) // required testPositivesByResultDate
          .setTestNegativesByResultDate(long) // required testNegativesByResultDate
          .setPresumedTestPositivePrevalence(double) // required presumedTestPositivePrevalence
          .setRtEffective(double) // required rtEffective
          .setPolicy(String) // required policy
          .build();
       
      Returns:
      A new ImmutableOutbreakCSV builder