Class ImmutableOutbreakHistory.Builder

java.lang.Object
io.github.ai4ci.abm.ImmutableOutbreakHistory.Builder
Enclosing class:
ImmutableOutbreakHistory

@NotThreadSafe public static final class ImmutableOutbreakHistory.Builder extends Object
Builds instances of type ImmutableOutbreakHistory. 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 ImmutableOutbreakHistory.Builder from(OutbreakHistory instance)
      Fill a builder with attribute values from the provided io.github.ai4ci.abm.OutbreakHistory instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

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

      @CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setEntity(Outbreak entity)
      Initializes the value for the entity attribute.
      Parameters:
      entity - The value for entity
      Returns:
      this builder for use in a chained invocation
    • setTime

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

      @CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setInfectedCount(long infectedCount)
      Initializes the value for the infectedCount attribute.
      Parameters:
      infectedCount - The value for infectedCount
      Returns:
      this builder for use in a chained invocation
    • setIncidence

      @CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setIncidence(long incidence)
      Initializes the value for the incidence attribute.
      Parameters:
      incidence - The value for incidence
      Returns:
      this builder for use in a chained invocation
    • setTestPositivesByResultDate

      @CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setTestPositivesByResultDate(long testPositivesByResultDate)
      Initializes the value for the testPositivesByResultDate attribute.
      Parameters:
      testPositivesByResultDate - The value for testPositivesByResultDate
      Returns:
      this builder for use in a chained invocation
    • setTestNegativesByResultDate

      @CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setTestNegativesByResultDate(long testNegativesByResultDate)
      Initializes the value for the testNegativesByResultDate attribute.
      Parameters:
      testNegativesByResultDate - The value for testNegativesByResultDate
      Returns:
      this builder for use in a chained invocation
    • setCumulativeInfections

      @CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setCumulativeInfections(long cumulativeInfections)
      Initializes the value for the cumulativeInfections attribute.
      Parameters:
      cumulativeInfections - The value for cumulativeInfections
      Returns:
      this builder for use in a chained invocation
    • setCumulativeAdmissions

      @CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setCumulativeAdmissions(long cumulativeAdmissions)
      Initializes the value for the cumulativeAdmissions attribute.
      Parameters:
      cumulativeAdmissions - The value for cumulativeAdmissions
      Returns:
      this builder for use in a chained invocation
    • setMaximumIncidence

      @CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setMaximumIncidence(long maximumIncidence)
      Initializes the value for the maximumIncidence attribute.
      Parameters:
      maximumIncidence - The value for maximumIncidence
      Returns:
      this builder for use in a chained invocation
    • setTimeToMaximumIncidence

      @CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setTimeToMaximumIncidence(long timeToMaximumIncidence)
      Initializes the value for the timeToMaximumIncidence attribute.
      Parameters:
      timeToMaximumIncidence - The value for timeToMaximumIncidence
      Returns:
      this builder for use in a chained invocation
    • setMaximumHospitalBurden

      @CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setMaximumHospitalBurden(long maximumHospitalBurden)
      Initializes the value for the maximumHospitalBurden attribute.
      Parameters:
      maximumHospitalBurden - The value for maximumHospitalBurden
      Returns:
      this builder for use in a chained invocation
    • setMaximumPrevalence

      @CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setMaximumPrevalence(double maximumPrevalence)
      Initializes the value for the maximumPrevalence attribute.
      Parameters:
      maximumPrevalence - The value for maximumPrevalence
      Returns:
      this builder for use in a chained invocation
    • setCumulativeMobilityDecrease

      @CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setCumulativeMobilityDecrease(double cumulativeMobilityDecrease)
      Initializes the value for the cumulativeMobilityDecrease attribute.
      Parameters:
      cumulativeMobilityDecrease - The value for cumulativeMobilityDecrease
      Returns:
      this builder for use in a chained invocation
    • setCumulativeComplianceDecrease

      @CanIgnoreReturnValue public final ImmutableOutbreakHistory.Builder setCumulativeComplianceDecrease(double cumulativeComplianceDecrease)
      Initializes the value for the cumulativeComplianceDecrease attribute.
      Parameters:
      cumulativeComplianceDecrease - The value for cumulativeComplianceDecrease
      Returns:
      this builder for use in a chained invocation
    • build

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