Class ImmutableOutbreakState.Builder

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

@NotThreadSafe public static final class ImmutableOutbreakState.Builder extends Object
Builds instances of type ImmutableOutbreakState. 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 ImmutableOutbreakState.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
    • from

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

      @CanIgnoreReturnValue public final ImmutableOutbreakState.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 ImmutableOutbreakState.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
    • setTransmissibilityModifier

      @CanIgnoreReturnValue public final ImmutableOutbreakState.Builder setTransmissibilityModifier(double transmissibilityModifier)
      Initializes the value for the transmissibilityModifier attribute.
      Parameters:
      transmissibilityModifier - The value for transmissibilityModifier
      Returns:
      this builder for use in a chained invocation
    • setContactDetectedProbability

      @CanIgnoreReturnValue public final ImmutableOutbreakState.Builder setContactDetectedProbability(double contactDetectedProbability)
      Initializes the value for the contactDetectedProbability attribute.
      Parameters:
      contactDetectedProbability - The value for contactDetectedProbability
      Returns:
      this builder for use in a chained invocation
    • setPresumedInfectiousPeriod

      @CanIgnoreReturnValue public final ImmutableOutbreakState.Builder setPresumedInfectiousPeriod(int presumedInfectiousPeriod)
      Initializes the value for the presumedInfectiousPeriod attribute.
      Parameters:
      presumedInfectiousPeriod - The value for presumedInfectiousPeriod
      Returns:
      this builder for use in a chained invocation
    • setPresumedIncubationPeriod

      @CanIgnoreReturnValue public final ImmutableOutbreakState.Builder setPresumedIncubationPeriod(int presumedIncubationPeriod)
      Initializes the value for the presumedIncubationPeriod attribute.
      Parameters:
      presumedIncubationPeriod - The value for presumedIncubationPeriod
      Returns:
      this builder for use in a chained invocation
    • setPresumedSymptomSpecificity

      @CanIgnoreReturnValue public final ImmutableOutbreakState.Builder setPresumedSymptomSpecificity(double presumedSymptomSpecificity)
      Initializes the value for the presumedSymptomSpecificity attribute.
      Parameters:
      presumedSymptomSpecificity - The value for presumedSymptomSpecificity
      Returns:
      this builder for use in a chained invocation
    • setPresumedSymptomSensitivity

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

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