Class SystemInfluenceRemoveAgent
- 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.SystemInfluenceRemoveAgent
-
- All Implemented Interfaces:
IInfluence
public final class SystemInfluenceRemoveAgent extends SystemInfluence
The system influence sent to a level when the reaction of that level has to remove the agent from the simulation, and make disappear its public local state from the public dynamic state of the levels.- Author:
- Yoann Kubera
-
-
Constructor Summary
Constructors Constructor Description SystemInfluenceRemoveAgent(LevelIdentifier targetLevel, SimulationTimeStamp timeLowerBound, SimulationTimeStamp timeUpperBound, ILocalStateOfAgent publicLocalStateOfAgent)
Builds a 'Remove agent' system influence removing a specific agent from the simulation during the next reaction of a specific level.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IAgent4Engine
getAgent()
Gets the agent to remove from the simulation.String
toString()
Uses the category, the target level and the removed agent 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
-
SystemInfluenceRemoveAgent
public SystemInfluenceRemoveAgent(LevelIdentifier targetLevel, SimulationTimeStamp timeLowerBound, SimulationTimeStamp timeUpperBound, ILocalStateOfAgent publicLocalStateOfAgent)
Builds a 'Remove agent' system influence removing a specific agent from the simulation during the next reaction of a specific level.- Parameters:
targetLevel
- The target level as described inIInfluence.getTargetLevel()
publicLocalStateOfAgent
- A public local state of the agent to remove from the simulationtimeLowerBound
- 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.- Throws:
IllegalArgumentException
- If the target level or the agent arenull
.
-
-
Method Detail
-
getAgent
public IAgent4Engine getAgent()
Gets the agent to remove from the simulation.- Returns:
- The agent to remove from the simulation.
-
toString
public String toString()
Uses the category, the target level and the removed agent 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 removed agent of the influence.
-
-