Class ModifiableOutbreak

java.lang.Object
io.github.ai4ci.abm.ModifiableOutbreak
All Implemented Interfaces:
Abstraction.Entity, Abstraction.HistoricalStateProvider<OutbreakHistory>, Outbreak, Serializable, Cloneable

@ParametersAreNonnullByDefault @Generated({"Modifiables.generator","Outbreak"}) @NotThreadSafe public class ModifiableOutbreak extends Object implements Outbreak
A modifiable implementation of the Outbreak type.

Use the constructor to create new modifiable instances. You may even extend this class to add some convenience methods, however most of the methods in this class are final to preserve safety and predictable invariants.

ModifiableOutbreak is not thread-safe

See Also:
  • Constructor Details

    • ModifiableOutbreak

      public ModifiableOutbreak()
  • Method Details

    • getUrn

      public final String getUrn()
      Specified by:
      getUrn in interface Abstraction.Entity
      Specified by:
      getUrn in interface Outbreak
      Returns:
      value of urn attribute
    • getPeople

      public final ThreadSafeArray<Person> getPeople()
      Specified by:
      getPeople in interface Outbreak
      Returns:
      value of people attribute
    • getSetupConfiguration

      public final SetupConfiguration getSetupConfiguration()
      Specified by:
      getSetupConfiguration in interface Outbreak
      Returns:
      value of setupConfiguration attribute
    • getExecutionConfiguration

      public final ExecutionConfiguration getExecutionConfiguration()
      Specified by:
      getExecutionConfiguration in interface Outbreak
      Returns:
      value of executionConfiguration attribute
    • getBaseline

      public final OutbreakBaseline getBaseline()
      Specified by:
      getBaseline in interface Outbreak
      Returns:
      value of baseline attribute
    • getNextState

      public final Ephemeral<ImmutableOutbreakState.Builder> getNextState()
      Specified by:
      getNextState in interface Outbreak
      Returns:
      value of nextState attribute
    • getNextHistory

      public final Ephemeral<ImmutableOutbreakHistory.Builder> getNextHistory()
      Specified by:
      getNextHistory in interface Outbreak
      Returns:
      value of nextHistory attribute
    • getStateMachine

      public final StateMachine getStateMachine()
      Specified by:
      getStateMachine in interface Outbreak
      Returns:
      value of stateMachine attribute
    • getCurrentState

      public final OutbreakState getCurrentState()
      Specified by:
      getCurrentState in interface Outbreak
      Returns:
      value of currentState attribute
    • getHistory

      public final List<OutbreakHistory> getHistory()
      Specified by:
      getHistory in interface Abstraction.HistoricalStateProvider<OutbreakHistory>
      Specified by:
      getHistory in interface Outbreak
      Returns:
      modifiable list history
    • getSocialNetwork

      public final org.jgrapht.graph.SimpleWeightedGraph<Person,SocialRelationship> getSocialNetwork()
      Specified by:
      getSocialNetwork in interface Outbreak
      Returns:
      value of socialNetwork attribute
    • hash

      public final int hash()
      Specified by:
      hash in interface Outbreak
      Returns:
      newly computed, not cached value of hash attribute
    • clear

      @CanIgnoreReturnValue public ModifiableOutbreak clear()
      Clears the object by setting all attributes to their initial values.
      Returns:
      this for use in a chained invocation
    • from

      @CanIgnoreReturnValue public ModifiableOutbreak from(Abstraction.Entity instance)
      Fill this modifiable instance with attribute values from the provided Abstraction.Entity instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this for use in a chained invocation
    • from

      @CanIgnoreReturnValue public ModifiableOutbreak from(Outbreak instance)
      Fill this modifiable instance with attribute values from the provided Outbreak instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this for use in a chained invocation
    • from

      public ModifiableOutbreak from(ModifiableOutbreak instance)
      Fill this modifiable instance with attribute values from the provided Outbreak instance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values). Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this for use in a chained invocation
    • setUrn

      @CanIgnoreReturnValue public ModifiableOutbreak setUrn(String urn)
      Assigns a value to the urn attribute.
      Parameters:
      urn - The value for urn
      Returns:
      this for use in a chained invocation
    • setPeople

      @CanIgnoreReturnValue public ModifiableOutbreak setPeople(ThreadSafeArray<Person> people)
      Assigns a value to the people attribute.
      Parameters:
      people - The value for people
      Returns:
      this for use in a chained invocation
    • setSetupConfiguration

      @CanIgnoreReturnValue public ModifiableOutbreak setSetupConfiguration(SetupConfiguration setupConfiguration)
      Assigns a value to the setupConfiguration attribute.
      Parameters:
      setupConfiguration - The value for setupConfiguration
      Returns:
      this for use in a chained invocation
    • setExecutionConfiguration

      @CanIgnoreReturnValue public ModifiableOutbreak setExecutionConfiguration(ExecutionConfiguration executionConfiguration)
      Assigns a value to the executionConfiguration attribute.
      Parameters:
      executionConfiguration - The value for executionConfiguration
      Returns:
      this for use in a chained invocation
    • setBaseline

      @CanIgnoreReturnValue public ModifiableOutbreak setBaseline(OutbreakBaseline baseline)
      Assigns a value to the baseline attribute.
      Parameters:
      baseline - The value for baseline
      Returns:
      this for use in a chained invocation
    • setNextState

      @CanIgnoreReturnValue public ModifiableOutbreak setNextState(Ephemeral<ImmutableOutbreakState.Builder> nextState)
      Assigns a value to the nextState attribute.
      Parameters:
      nextState - The value for nextState
      Returns:
      this for use in a chained invocation
    • setNextHistory

      @CanIgnoreReturnValue public ModifiableOutbreak setNextHistory(Ephemeral<ImmutableOutbreakHistory.Builder> nextHistory)
      Assigns a value to the nextHistory attribute.
      Parameters:
      nextHistory - The value for nextHistory
      Returns:
      this for use in a chained invocation
    • setStateMachine

      @CanIgnoreReturnValue public ModifiableOutbreak setStateMachine(StateMachine stateMachine)
      Assigns a value to the stateMachine attribute.
      Parameters:
      stateMachine - The value for stateMachine
      Returns:
      this for use in a chained invocation
    • setCurrentState

      @CanIgnoreReturnValue public ModifiableOutbreak setCurrentState(OutbreakState currentState)
      Assigns a value to the currentState attribute.
      Parameters:
      currentState - The value for currentState
      Returns:
      this for use in a chained invocation
    • addHistory

      @CanIgnoreReturnValue public ModifiableOutbreak addHistory(OutbreakHistory element)
      Adds one element to history list.
      Parameters:
      element - The history element
      Returns:
      this for use in a chained invocation
    • addHistory

      @CanIgnoreReturnValue public final ModifiableOutbreak addHistory(OutbreakHistory... elements)
      Adds elements to history list.
      Parameters:
      elements - An array of history elements
      Returns:
      this for use in a chained invocation
    • setHistory

      @CanIgnoreReturnValue public ModifiableOutbreak setHistory(Iterable<? extends OutbreakHistory> elements)
      Sets or replaces all elements for history list.
      Parameters:
      elements - An iterable of history elements
      Returns:
      this for use in a chained invocation
    • addAllHistory

      @CanIgnoreReturnValue public ModifiableOutbreak addAllHistory(Iterable<? extends OutbreakHistory> elements)
      Adds elements to history list.
      Parameters:
      elements - An iterable of history elements
      Returns:
      this for use in a chained invocation
    • setSocialNetwork

      @CanIgnoreReturnValue public ModifiableOutbreak setSocialNetwork(org.jgrapht.graph.SimpleWeightedGraph<Person,SocialRelationship> socialNetwork)
      Assigns a value to the socialNetwork attribute.
      Parameters:
      socialNetwork - The value for socialNetwork
      Returns:
      this for use in a chained invocation
    • initialisedUrn

      public final boolean initialisedUrn()
      Returns true if the required attribute urn is set.
      Returns:
      true if set
    • initialisedPeople

      public final boolean initialisedPeople()
      Returns true if the required attribute people is set.
      Returns:
      true if set
    • initialisedSetupConfiguration

      public final boolean initialisedSetupConfiguration()
      Returns true if the required attribute setupConfiguration is set.
      Returns:
      true if set
    • initialisedExecutionConfiguration

      public final boolean initialisedExecutionConfiguration()
      Returns true if the required attribute executionConfiguration is set.
      Returns:
      true if set
    • initialisedBaseline

      public final boolean initialisedBaseline()
      Returns true if the required attribute baseline is set.
      Returns:
      true if set
    • initialisedNextState

      public final boolean initialisedNextState()
      Returns true if the required attribute nextState is set.
      Returns:
      true if set
    • initialisedNextHistory

      public final boolean initialisedNextHistory()
      Returns true if the required attribute nextHistory is set.
      Returns:
      true if set
    • initialisedStateMachine

      public final boolean initialisedStateMachine()
      Returns true if the required attribute stateMachine is set.
      Returns:
      true if set
    • initialisedCurrentState

      public final boolean initialisedCurrentState()
      Returns true if the required attribute currentState is set.
      Returns:
      true if set
    • initialisedSocialNetwork

      public final boolean initialisedSocialNetwork()
      Returns true if the required attribute socialNetwork is set.
      Returns:
      true if set
    • unsetUrn

      @CanIgnoreReturnValue public final ModifiableOutbreak unsetUrn()
      Reset an attribute to its initial value.
      Returns:
      this for use in a chained invocation
    • unsetPeople

      @CanIgnoreReturnValue public final ModifiableOutbreak unsetPeople()
      Reset an attribute to its initial value.
      Returns:
      this for use in a chained invocation
    • unsetSetupConfiguration

      @CanIgnoreReturnValue public final ModifiableOutbreak unsetSetupConfiguration()
      Reset an attribute to its initial value.
      Returns:
      this for use in a chained invocation
    • unsetExecutionConfiguration

      @CanIgnoreReturnValue public final ModifiableOutbreak unsetExecutionConfiguration()
      Reset an attribute to its initial value.
      Returns:
      this for use in a chained invocation
    • unsetBaseline

      @CanIgnoreReturnValue public final ModifiableOutbreak unsetBaseline()
      Reset an attribute to its initial value.
      Returns:
      this for use in a chained invocation
    • unsetNextState

      @CanIgnoreReturnValue public final ModifiableOutbreak unsetNextState()
      Reset an attribute to its initial value.
      Returns:
      this for use in a chained invocation
    • unsetNextHistory

      @CanIgnoreReturnValue public final ModifiableOutbreak unsetNextHistory()
      Reset an attribute to its initial value.
      Returns:
      this for use in a chained invocation
    • unsetStateMachine

      @CanIgnoreReturnValue public final ModifiableOutbreak unsetStateMachine()
      Reset an attribute to its initial value.
      Returns:
      this for use in a chained invocation
    • unsetCurrentState

      @CanIgnoreReturnValue public final ModifiableOutbreak unsetCurrentState()
      Reset an attribute to its initial value.
      Returns:
      this for use in a chained invocation
    • unsetSocialNetwork

      @CanIgnoreReturnValue public final ModifiableOutbreak unsetSocialNetwork()
      Reset an attribute to its initial value.
      Returns:
      this for use in a chained invocation
    • isInitialized

      public final boolean isInitialized()
      Returns true if all required attributes are set, indicating that the object is initialized.
      Returns:
      true if set
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ModifiableOutbreak that have equal attribute values. An uninitialized instance is equal only to itself.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Prints the immutable value Outbreak delegating to a customized method.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value