Class SystemInfluenceAddAgentToLevel
- java.lang.Object
-
- fr.univ_artois.lgi2a.similar.microkernel.influences.AbstractInfluence
-
- fr.univ_artois.lgi2a.similar.microkernel.influences.SystemInfluence
-
- fr.univ_artois.lgi2a.similar.microkernel.influences.system.SystemInfluenceAddAgentToLevel
-
- All Implemented Interfaces:
IInfluence
public class SystemInfluenceAddAgentToLevel extends SystemInfluence
The system influence sent to a level when the reaction of that level has to include an agent to the level. This influence implies that a public and a private local state have to be added to that agent.Usage
This influence is sent to the levels where the agent is being added, to include the local states of the agent into the dynamic state of these levels as well as in the specifications of the agent.
- Author:
- Yoann Kubera
-
-
Constructor Summary
Constructors Constructor Description SystemInfluenceAddAgentToLevel(SimulationTimeStamp timeLowerBound, SimulationTimeStamp timeUpperBound, ILocalStateOfAgent publicLocalState, ILocalStateOfAgent privateLocalState)
Builds an 'Add agent to a level' system influence, adding an agent to the dynamic state of a specific level during the next reaction of that level.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ILocalStateOfAgent4Engine
getPrivateLocalState()
Gets the private local state to add to the agent (and to the dynamic state of the level).ILocalStateOfAgent4Engine
getPublicLocalState()
Gets the public local state to add to the agent (and to the dynamic state of the level).String
toString()
Uses the category, the target level and the owner of the public local state of the influence to build a printable version of this object.-
Methods inherited from class fr.univ_artois.lgi2a.similar.microkernel.influences.SystemInfluence
isSystem
-
Methods inherited from class fr.univ_artois.lgi2a.similar.microkernel.influences.AbstractInfluence
getCategory, getTargetLevel, getTimeLowerBound, getTimeUpperBound
-
-
-
-
Field Detail
-
CATEGORY
public static final String CATEGORY
The category of this influence.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SystemInfluenceAddAgentToLevel
public SystemInfluenceAddAgentToLevel(SimulationTimeStamp timeLowerBound, SimulationTimeStamp timeUpperBound, ILocalStateOfAgent publicLocalState, ILocalStateOfAgent privateLocalState)
Builds an 'Add agent to a level' system influence, adding an agent to the dynamic state of a specific level during the next reaction of that level.- Parameters:
timeLowerBound
- The lower bound of the transitory period during which this influence was created.timeUpperBound
- The upper bound of the transitory period during which this influence was created.publicLocalState
- The public local state to add to the agent (and to the dynamic state of the level).privateLocalState
- The private local state to add to the agent (and to the dynamic state of the level).- Throws:
IllegalArgumentException
- If the public local state isnull
.
-
-
Method Detail
-
getPublicLocalState
public ILocalStateOfAgent4Engine getPublicLocalState()
Gets the public local state to add to the agent (and to the dynamic state of the level).- Returns:
- The public local state to add to the agent (and to the dynamic state of the level).
-
getPrivateLocalState
public ILocalStateOfAgent4Engine getPrivateLocalState()
Gets the private local state to add to the agent (and to the dynamic state of the level).- Returns:
- The private local state to add to the agent (and to the dynamic state of the level).
-
toString
public String toString()
Uses the category, the target level and the owner of the public local state of the influence to build a printable version of this object.- Overrides:
toString
in classAbstractInfluence
- Returns:
- The concatenation of the category, the target level and the added owner of the public local state of the influence.
-
-