Class 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 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 in IInfluence.getTargetLevel()
        publicLocalStateOfAgent - A public local state of the agent to remove from the simulation
        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.
        Throws:
        IllegalArgumentException - If the target level or the agent are null.
    • 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 class AbstractInfluence
        Returns:
        The concatenation of the category, the target level and the removed agent of the influence.