Package io.github.ai4ci.abm
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllHistory
(Iterable<? extends OutbreakHistory> elements) Adds elements tohistory
list.addHistory
(OutbreakHistory element) Adds one element tohistory
list.final ModifiableOutbreak
addHistory
(OutbreakHistory... elements) Adds elements tohistory
list.clear()
Clears the object by setting all attributes to their initial values.boolean
This instance is equal to all instances ofModifiableOutbreak
that have equal attribute values.from
(Abstraction.Entity instance) Fill this modifiable instance with attribute values from the providedAbstraction.Entity
instance.from
(ModifiableOutbreak instance) Fill this modifiable instance with attribute values from the providedOutbreak
instance.Fill this modifiable instance with attribute values from the providedOutbreak
instance.final OutbreakBaseline
final OutbreakState
final ExecutionConfiguration
final List<OutbreakHistory>
final ThreadSafeArray<Person>
final SetupConfiguration
final org.jgrapht.graph.SimpleWeightedGraph<Person,
SocialRelationship> final StateMachine
final String
getUrn()
final int
hash()
final int
hashCode()
final boolean
Returnstrue
if the required attributebaseline
is set.final boolean
Returnstrue
if the required attributecurrentState
is set.final boolean
Returnstrue
if the required attributeexecutionConfiguration
is set.final boolean
Returnstrue
if the required attributenextHistory
is set.final boolean
Returnstrue
if the required attributenextState
is set.final boolean
Returnstrue
if the required attributepeople
is set.final boolean
Returnstrue
if the required attributesetupConfiguration
is set.final boolean
Returnstrue
if the required attributesocialNetwork
is set.final boolean
Returnstrue
if the required attributestateMachine
is set.final boolean
Returnstrue
if the required attributeurn
is set.final boolean
Returnstrue
if all required attributes are set, indicating that the object is initialized.setBaseline
(OutbreakBaseline baseline) Assigns a value to thebaseline
attribute.setCurrentState
(OutbreakState currentState) Assigns a value to thecurrentState
attribute.setExecutionConfiguration
(ExecutionConfiguration executionConfiguration) Assigns a value to theexecutionConfiguration
attribute.setHistory
(Iterable<? extends OutbreakHistory> elements) Sets or replaces all elements forhistory
list.setNextHistory
(Ephemeral<ImmutableOutbreakHistory.Builder> nextHistory) Assigns a value to thenextHistory
attribute.setNextState
(Ephemeral<ImmutableOutbreakState.Builder> nextState) Assigns a value to thenextState
attribute.setPeople
(ThreadSafeArray<Person> people) Assigns a value to thepeople
attribute.setSetupConfiguration
(SetupConfiguration setupConfiguration) Assigns a value to thesetupConfiguration
attribute.setSocialNetwork
(org.jgrapht.graph.SimpleWeightedGraph<Person, SocialRelationship> socialNetwork) Assigns a value to thesocialNetwork
attribute.setStateMachine
(StateMachine stateMachine) Assigns a value to thestateMachine
attribute.Assigns a value to theurn
attribute.toString()
Prints the immutable valueOutbreak
delegating to a customized method.final ModifiableOutbreak
Reset an attribute to its initial value.final ModifiableOutbreak
Reset an attribute to its initial value.final ModifiableOutbreak
Reset an attribute to its initial value.final ModifiableOutbreak
Reset an attribute to its initial value.final ModifiableOutbreak
Reset an attribute to its initial value.final ModifiableOutbreak
Reset an attribute to its initial value.final ModifiableOutbreak
Reset an attribute to its initial value.final ModifiableOutbreak
Reset an attribute to its initial value.final ModifiableOutbreak
Reset an attribute to its initial value.final ModifiableOutbreak
unsetUrn()
Reset an attribute to its initial value.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.ai4ci.abm.mechanics.Abstraction.Entity
getExperimentName, getExperimentReplica, getModelName, getModelReplica
Methods inherited from interface io.github.ai4ci.abm.mechanics.Abstraction.HistoricalStateProvider
getHistory, getHistoryEntry
Methods inherited from interface io.github.ai4ci.abm.Outbreak
equality, getCurrentHistory, getPersonById, getPersonHistoryByIdAndTime, print
-
Constructor Details
-
ModifiableOutbreak
public ModifiableOutbreak()
-
-
Method Details
-
getUrn
- Specified by:
getUrn
in interfaceAbstraction.Entity
- Specified by:
getUrn
in interfaceOutbreak
- Returns:
- value of
urn
attribute
-
getPeople
-
getSetupConfiguration
- Specified by:
getSetupConfiguration
in interfaceOutbreak
- Returns:
- value of
setupConfiguration
attribute
-
getExecutionConfiguration
- Specified by:
getExecutionConfiguration
in interfaceOutbreak
- Returns:
- value of
executionConfiguration
attribute
-
getBaseline
- Specified by:
getBaseline
in interfaceOutbreak
- Returns:
- value of
baseline
attribute
-
getNextState
- Specified by:
getNextState
in interfaceOutbreak
- Returns:
- value of
nextState
attribute
-
getNextHistory
- Specified by:
getNextHistory
in interfaceOutbreak
- Returns:
- value of
nextHistory
attribute
-
getStateMachine
- Specified by:
getStateMachine
in interfaceOutbreak
- Returns:
- value of
stateMachine
attribute
-
getCurrentState
- Specified by:
getCurrentState
in interfaceOutbreak
- Returns:
- value of
currentState
attribute
-
getHistory
- Specified by:
getHistory
in interfaceAbstraction.HistoricalStateProvider<OutbreakHistory>
- Specified by:
getHistory
in interfaceOutbreak
- Returns:
- modifiable list
history
-
getSocialNetwork
- Specified by:
getSocialNetwork
in interfaceOutbreak
- Returns:
- value of
socialNetwork
attribute
-
hash
public final int hash() -
clear
Clears the object by setting all attributes to their initial values.- Returns:
this
for use in a chained invocation
-
from
Fill this modifiable instance with attribute values from the providedAbstraction.Entity
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
for use in a chained invocation
-
from
Fill this modifiable instance with attribute values from the providedOutbreak
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
for use in a chained invocation
-
from
Fill this modifiable instance with attribute values from the providedOutbreak
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
Assigns a value to theurn
attribute.- Parameters:
urn
- The value for urn- Returns:
this
for use in a chained invocation
-
setPeople
Assigns a value to thepeople
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 thesetupConfiguration
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 theexecutionConfiguration
attribute.- Parameters:
executionConfiguration
- The value for executionConfiguration- Returns:
this
for use in a chained invocation
-
setBaseline
Assigns a value to thebaseline
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 thenextState
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 thenextHistory
attribute.- Parameters:
nextHistory
- The value for nextHistory- Returns:
this
for use in a chained invocation
-
setStateMachine
Assigns a value to thestateMachine
attribute.- Parameters:
stateMachine
- The value for stateMachine- Returns:
this
for use in a chained invocation
-
setCurrentState
Assigns a value to thecurrentState
attribute.- Parameters:
currentState
- The value for currentState- Returns:
this
for use in a chained invocation
-
addHistory
Adds one element tohistory
list.- Parameters:
element
- The history element- Returns:
this
for use in a chained invocation
-
addHistory
Adds elements tohistory
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 forhistory
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 tohistory
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 thesocialNetwork
attribute.- Parameters:
socialNetwork
- The value for socialNetwork- Returns:
this
for use in a chained invocation
-
initialisedUrn
public final boolean initialisedUrn()Returnstrue
if the required attributeurn
is set.- Returns:
true
if set
-
initialisedPeople
public final boolean initialisedPeople()Returnstrue
if the required attributepeople
is set.- Returns:
true
if set
-
initialisedSetupConfiguration
public final boolean initialisedSetupConfiguration()Returnstrue
if the required attributesetupConfiguration
is set.- Returns:
true
if set
-
initialisedExecutionConfiguration
public final boolean initialisedExecutionConfiguration()Returnstrue
if the required attributeexecutionConfiguration
is set.- Returns:
true
if set
-
initialisedBaseline
public final boolean initialisedBaseline()Returnstrue
if the required attributebaseline
is set.- Returns:
true
if set
-
initialisedNextState
public final boolean initialisedNextState()Returnstrue
if the required attributenextState
is set.- Returns:
true
if set
-
initialisedNextHistory
public final boolean initialisedNextHistory()Returnstrue
if the required attributenextHistory
is set.- Returns:
true
if set
-
initialisedStateMachine
public final boolean initialisedStateMachine()Returnstrue
if the required attributestateMachine
is set.- Returns:
true
if set
-
initialisedCurrentState
public final boolean initialisedCurrentState()Returnstrue
if the required attributecurrentState
is set.- Returns:
true
if set
-
initialisedSocialNetwork
public final boolean initialisedSocialNetwork()Returnstrue
if the required attributesocialNetwork
is set.- Returns:
true
if set
-
unsetUrn
Reset an attribute to its initial value.- Returns:
this
for use in a chained invocation
-
unsetPeople
Reset an attribute to its initial value.- Returns:
this
for use in a chained invocation
-
unsetSetupConfiguration
Reset an attribute to its initial value.- Returns:
this
for use in a chained invocation
-
unsetExecutionConfiguration
Reset an attribute to its initial value.- Returns:
this
for use in a chained invocation
-
unsetBaseline
Reset an attribute to its initial value.- Returns:
this
for use in a chained invocation
-
unsetNextState
Reset an attribute to its initial value.- Returns:
this
for use in a chained invocation
-
unsetNextHistory
Reset an attribute to its initial value.- Returns:
this
for use in a chained invocation
-
unsetStateMachine
Reset an attribute to its initial value.- Returns:
this
for use in a chained invocation
-
unsetCurrentState
Reset an attribute to its initial value.- Returns:
this
for use in a chained invocation
-
unsetSocialNetwork
Reset an attribute to its initial value.- Returns:
this
for use in a chained invocation
-
isInitialized
public final boolean isInitialized()Returnstrue
if all required attributes are set, indicating that the object is initialized.- Returns:
true
if set
-
equals
This instance is equal to all instances ofModifiableOutbreak
that have equal attribute values. An uninitialized instance is equal only to itself. -
hashCode
public final int hashCode() -
toString
Prints the immutable valueOutbreak
delegating to a customized method.
-