Class ImmutableInHostStochasticState.Builder

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

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

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setTargets(int targets)
      Initializes the value for the targets attribute.
      Parameters:
      targets - The value for targets
      Returns:
      this builder for use in a chained invocation
    • setImmuneTargetRatio

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setImmuneTargetRatio(double immuneTargetRatio)
      Initializes the value for the immuneTargetRatio attribute.
      Parameters:
      immuneTargetRatio - The value for immuneTargetRatio
      Returns:
      this builder for use in a chained invocation
    • setImmuneActivationRate

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setImmuneActivationRate(double immuneActivationRate)
      Initializes the value for the immuneActivationRate attribute.
      Parameters:
      immuneActivationRate - The value for immuneActivationRate
      Returns:
      this builder for use in a chained invocation
    • setImmuneWaningRate

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setImmuneWaningRate(double immuneWaningRate)
      Initializes the value for the immuneWaningRate attribute.
      Parameters:
      immuneWaningRate - The value for immuneWaningRate
      Returns:
      this builder for use in a chained invocation
    • setInfectionCarrierProbability

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setInfectionCarrierProbability(double infectionCarrierProbability)
      Initializes the value for the infectionCarrierProbability attribute.
      Parameters:
      infectionCarrierProbability - The value for infectionCarrierProbability
      Returns:
      this builder for use in a chained invocation
    • setTargetRecoveryRate

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setTargetRecoveryRate(double targetRecoveryRate)
      Initializes the value for the targetRecoveryRate attribute.
      Parameters:
      targetRecoveryRate - The value for targetRecoveryRate
      Returns:
      this builder for use in a chained invocation
    • setTime

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.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
    • setVirions

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setVirions(int virions)
      Initializes the value for the virions attribute.
      Parameters:
      virions - The value for virions
      Returns:
      this builder for use in a chained invocation
    • setVirionsProduced

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setVirionsProduced(int virionsProduced)
      Initializes the value for the virionsProduced attribute.
      Parameters:
      virionsProduced - The value for virionsProduced
      Returns:
      this builder for use in a chained invocation
    • setTargetSusceptible

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setTargetSusceptible(int targetSusceptible)
      Initializes the value for the targetSusceptible attribute.
      Parameters:
      targetSusceptible - The value for targetSusceptible
      Returns:
      this builder for use in a chained invocation
    • setTargetExposed

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setTargetExposed(int targetExposed)
      Initializes the value for the targetExposed attribute.
      Parameters:
      targetExposed - The value for targetExposed
      Returns:
      this builder for use in a chained invocation
    • setTargetInfected

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setTargetInfected(int targetInfected)
      Initializes the value for the targetInfected attribute.
      Parameters:
      targetInfected - The value for targetInfected
      Returns:
      this builder for use in a chained invocation
    • setImmune

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setImmune(Integer immune)
      Initializes the value for the immune attribute.

      If not set, this attribute will have a default value as returned by the initializer of immune.

      Parameters:
      immune - The value for immune
      Returns:
      this builder for use in a chained invocation
    • setImmunePriming

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setImmunePriming(int immunePriming)
      Initializes the value for the immunePriming attribute.
      Parameters:
      immunePriming - The value for immunePriming
      Returns:
      this builder for use in a chained invocation
    • setImmuneActive

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setImmuneActive(int immuneActive)
      Initializes the value for the immuneActive attribute.
      Parameters:
      immuneActive - The value for immuneActive
      Returns:
      this builder for use in a chained invocation
    • setBaselineViralReplicationRate

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setBaselineViralReplicationRate(double baselineViralReplicationRate)
      Initializes the value for the baselineViralReplicationRate attribute.
      Parameters:
      baselineViralReplicationRate - The value for baselineViralReplicationRate
      Returns:
      this builder for use in a chained invocation
    • setBaselineViralInfectionRate

      @CanIgnoreReturnValue public final ImmutableInHostStochasticState.Builder setBaselineViralInfectionRate(double baselineViralInfectionRate)
      Initializes the value for the baselineViralInfectionRate attribute.
      Parameters:
      baselineViralInfectionRate - The value for baselineViralInfectionRate
      Returns:
      this builder for use in a chained invocation
    • setVirionsDiseaseCutoff

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

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