Class ImmutableOutbreakBaseline.Builder

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

@NotThreadSafe public static final class ImmutableOutbreakBaseline.Builder extends Object
Builds instances of type ImmutableOutbreakBaseline. 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 ImmutableOutbreakBaseline.Builder from(OutbreakBaseline instance)
      Fill a builder with attribute values from the provided OutbreakBaseline instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setViralLoadTransmissibilityProbabilityFactor

      @CanIgnoreReturnValue public final ImmutableOutbreakBaseline.Builder setViralLoadTransmissibilityProbabilityFactor(double viralLoadTransmissibilityProbabilityFactor)
      Initializes the value for the viralLoadTransmissibilityProbabilityFactor attribute.
      Parameters:
      viralLoadTransmissibilityProbabilityFactor - The value for viralLoadTransmissibilityProbabilityFactor
      Returns:
      this builder for use in a chained invocation
    • setExpectedContactsPerPersonPerDay

      @CanIgnoreReturnValue public final ImmutableOutbreakBaseline.Builder setExpectedContactsPerPersonPerDay(double expectedContactsPerPersonPerDay)
      Initializes the value for the expectedContactsPerPersonPerDay attribute.
      Parameters:
      expectedContactsPerPersonPerDay - The value for expectedContactsPerPersonPerDay
      Returns:
      this builder for use in a chained invocation
    • setSeveritySymptomsCutoff

      @CanIgnoreReturnValue public final ImmutableOutbreakBaseline.Builder setSeveritySymptomsCutoff(double severitySymptomsCutoff)
      Initializes the value for the severitySymptomsCutoff attribute.
      Parameters:
      severitySymptomsCutoff - The value for severitySymptomsCutoff
      Returns:
      this builder for use in a chained invocation
    • setSeverityHospitalisationCutoff

      @CanIgnoreReturnValue public final ImmutableOutbreakBaseline.Builder setSeverityHospitalisationCutoff(double severityHospitalisationCutoff)
      Initializes the value for the severityHospitalisationCutoff attribute.
      Parameters:
      severityHospitalisationCutoff - The value for severityHospitalisationCutoff
      Returns:
      this builder for use in a chained invocation
    • setSeverityDeathCutoff

      @CanIgnoreReturnValue public final ImmutableOutbreakBaseline.Builder setSeverityDeathCutoff(double severityDeathCutoff)
      Initializes the value for the severityDeathCutoff attribute.
      Parameters:
      severityDeathCutoff - The value for severityDeathCutoff
      Returns:
      this builder for use in a chained invocation
    • setDefaultPolicyState

      @CanIgnoreReturnValue public final ImmutableOutbreakBaseline.Builder setDefaultPolicyState(StateMachine.PolicyState defaultPolicyState)
      Initializes the value for the defaultPolicyState attribute.
      Parameters:
      defaultPolicyState - The value for defaultPolicyState
      Returns:
      this builder for use in a chained invocation
    • setInfectiveDuration

      @CanIgnoreReturnValue public final ImmutableOutbreakBaseline.Builder setInfectiveDuration(int infectiveDuration)
      Initializes the value for the infectiveDuration attribute.
      Parameters:
      infectiveDuration - The value for infectiveDuration
      Returns:
      this builder for use in a chained invocation
    • setSymptomDuration

      @CanIgnoreReturnValue public final ImmutableOutbreakBaseline.Builder setSymptomDuration(int symptomDuration)
      Initializes the value for the symptomDuration attribute.
      Parameters:
      symptomDuration - The value for symptomDuration
      Returns:
      this builder for use in a chained invocation
    • build

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