Class ImmutableInHostMarkovState.Builder

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

@NotThreadSafe public static final class ImmutableInHostMarkovState.Builder extends Object
Builds instances of type ImmutableInHostMarkovState. 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 ImmutableInHostMarkovState.Builder from(InHostMarkovState instance)
      Fill a builder with attribute values from the provided InHostMarkovState 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
    • setTime

      @CanIgnoreReturnValue public final ImmutableInHostMarkovState.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
    • setInfectionCaseRate

      @CanIgnoreReturnValue public final ImmutableInHostMarkovState.Builder setInfectionCaseRate(double infectionCaseRate)
      Initializes the value for the infectionCaseRate attribute.
      Parameters:
      infectionCaseRate - The value for infectionCaseRate
      Returns:
      this builder for use in a chained invocation
    • setInfectionHospitalisationRate

      @CanIgnoreReturnValue public final ImmutableInHostMarkovState.Builder setInfectionHospitalisationRate(double infectionHospitalisationRate)
      Initializes the value for the infectionHospitalisationRate attribute.
      Parameters:
      infectionHospitalisationRate - The value for infectionHospitalisationRate
      Returns:
      this builder for use in a chained invocation
    • setInfectionFatalityRate

      @CanIgnoreReturnValue public final ImmutableInHostMarkovState.Builder setInfectionFatalityRate(double infectionFatalityRate)
      Initializes the value for the infectionFatalityRate attribute.
      Parameters:
      infectionFatalityRate - The value for infectionFatalityRate
      Returns:
      this builder for use in a chained invocation
    • setDiseaseState

      @CanIgnoreReturnValue public final ImmutableInHostMarkovState.Builder setDiseaseState(InHostMarkovState.DiseaseState diseaseState)
      Initializes the value for the diseaseState attribute.
      Parameters:
      diseaseState - The value for diseaseState
      Returns:
      this builder for use in a chained invocation
    • setSymptomState

      @CanIgnoreReturnValue public final ImmutableInHostMarkovState.Builder setSymptomState(InHostMarkovState.SymptomState symptomState)
      Initializes the value for the symptomState attribute.
      Parameters:
      symptomState - The value for symptomState
      Returns:
      this builder for use in a chained invocation
    • setMachine

      @CanIgnoreReturnValue public final ImmutableInHostMarkovState.Builder setMachine(InHostMarkovState.InHostMarkovStateMachine machine)
      Initializes the value for the machine attribute.
      Parameters:
      machine - The value for machine
      Returns:
      this builder for use in a chained invocation
    • build

      Returns:
      An immutable instance of InHostMarkovState
      Throws:
      IllegalStateException - if any required attributes are missing