Class ImmutablePersonStateCSV.Builder

java.lang.Object
io.github.ai4ci.output.ImmutablePersonStateCSV.Builder
Enclosing class:
ImmutablePersonStateCSV

@NotThreadSafe public static final class ImmutablePersonStateCSV.Builder extends Object
Builds instances of type ImmutablePersonStateCSV. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder from(CommonCSV.Execution instance)
      Fill a builder with attribute values from the provided io.github.ai4ci.output.CommonCSV.Execution instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder from(PersonStateCSV instance)
      Fill a builder with attribute values from the provided io.github.ai4ci.output.PersonStateCSV instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder from(CommonCSV.State instance)
      Fill a builder with attribute values from the provided io.github.ai4ci.output.CommonCSV.State instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder from(CommonCSV.Model instance)
      Fill a builder with attribute values from the provided io.github.ai4ci.output.CommonCSV.Model instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setModelName

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setModelName(String modelName)
      Initializes the value for the modelName attribute.
      Parameters:
      modelName - The value for modelName
      Returns:
      this builder for use in a chained invocation
    • setExperimentName

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setExperimentName(String experimentName)
      Initializes the value for the experimentName attribute.
      Parameters:
      experimentName - The value for experimentName
      Returns:
      this builder for use in a chained invocation
    • setModelReplica

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setModelReplica(int modelReplica)
      Initializes the value for the modelReplica attribute.
      Parameters:
      modelReplica - The value for modelReplica
      Returns:
      this builder for use in a chained invocation
    • setExperimentReplica

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setExperimentReplica(int experimentReplica)
      Initializes the value for the experimentReplica attribute.
      Parameters:
      experimentReplica - The value for experimentReplica
      Returns:
      this builder for use in a chained invocation
    • setTime

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setTime(int time)
      Initializes the value for the time attribute.
      Parameters:
      time - The value for time
      Returns:
      this builder for use in a chained invocation
    • setPersonId

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setPersonId(int personId)
      Initializes the value for the personId attribute.
      Parameters:
      personId - The value for personId
      Returns:
      this builder for use in a chained invocation
    • setBehaviour

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setBehaviour(String behaviour)
      Initializes the value for the behaviour attribute.
      Parameters:
      behaviour - The value for behaviour
      Returns:
      this builder for use in a chained invocation
    • setInfectious

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setInfectious(boolean infectious)
      Initializes the value for the infectious attribute.
      Parameters:
      infectious - The value for infectious
      Returns:
      this builder for use in a chained invocation
    • setSymptomatic

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setSymptomatic(boolean symptomatic)
      Initializes the value for the symptomatic attribute.
      Parameters:
      symptomatic - The value for symptomatic
      Returns:
      this builder for use in a chained invocation
    • setRequiringHospitalisation

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setRequiringHospitalisation(boolean requiringHospitalisation)
      Initializes the value for the requiringHospitalisation attribute.
      Parameters:
      requiringHospitalisation - The value for requiringHospitalisation
      Returns:
      this builder for use in a chained invocation
    • setDead

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setDead(boolean dead)
      Initializes the value for the dead attribute.
      Parameters:
      dead - The value for dead
      Returns:
      this builder for use in a chained invocation
    • setNormalisedSeverity

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setNormalisedSeverity(double normalisedSeverity)
      Initializes the value for the normalisedSeverity attribute.
      Parameters:
      normalisedSeverity - The value for normalisedSeverity
      Returns:
      this builder for use in a chained invocation
    • setNormalisedViralLoad

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setNormalisedViralLoad(double normalisedViralLoad)
      Initializes the value for the normalisedViralLoad attribute.
      Parameters:
      normalisedViralLoad - The value for normalisedViralLoad
      Returns:
      this builder for use in a chained invocation
    • setContactExposure

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setContactExposure(double contactExposure)
      Initializes the value for the contactExposure attribute.
      Parameters:
      contactExposure - The value for contactExposure
      Returns:
      this builder for use in a chained invocation
    • setPresumedLocalPrevalence

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setPresumedLocalPrevalence(double presumedLocalPrevalence)
      Initializes the value for the presumedLocalPrevalence attribute.
      Parameters:
      presumedLocalPrevalence - The value for presumedLocalPrevalence
      Returns:
      this builder for use in a chained invocation
    • setTrueLocalPrevalence

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setTrueLocalPrevalence(double trueLocalPrevalence)
      Initializes the value for the trueLocalPrevalence attribute.
      Parameters:
      trueLocalPrevalence - The value for trueLocalPrevalence
      Returns:
      this builder for use in a chained invocation
    • setProbabilityInfectiousToday

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setProbabilityInfectiousToday(double probabilityInfectiousToday)
      Initializes the value for the probabilityInfectiousToday attribute.
      Parameters:
      probabilityInfectiousToday - The value for probabilityInfectiousToday
      Returns:
      this builder for use in a chained invocation
    • setLogOddsInfectiousToday

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setLogOddsInfectiousToday(double logOddsInfectiousToday)
      Initializes the value for the logOddsInfectiousToday attribute.
      Parameters:
      logOddsInfectiousToday - The value for logOddsInfectiousToday
      Returns:
      this builder for use in a chained invocation
    • setContactCount

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setContactCount(long contactCount)
      Initializes the value for the contactCount attribute.
      Parameters:
      contactCount - The value for contactCount
      Returns:
      this builder for use in a chained invocation
    • setExposureCount

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setExposureCount(long exposureCount)
      Initializes the value for the exposureCount attribute.
      Parameters:
      exposureCount - The value for exposureCount
      Returns:
      this builder for use in a chained invocation
    • setIncidentInfection

      @CanIgnoreReturnValue public final ImmutablePersonStateCSV.Builder setIncidentInfection(boolean incidentInfection)
      Initializes the value for the incidentInfection attribute.
      Parameters:
      incidentInfection - The value for incidentInfection
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutablePersonStateCSV build()
      Returns:
      An immutable instance of PersonStateCSV
      Throws:
      IllegalStateException - if any required attributes are missing