Interface EntityContext

All Superinterfaces:
Context
All Known Subinterfaces:
AgentContext, EnvironmentContext
All Known Implementing Classes:
AgentSimulationContext, EnvironmentSimulationContext

public sealed interface EntityContext extends Context permits AgentContext, EnvironmentContext
Interface for marking a context as belonging to an entity.

This interface is extended by the entity-flavoured context interfaces: AgentContext and EnvironmentContext.

  • Method Details

    • addAgent

      void addAgent(Agent agent)
      Adds an agent to the current core's local agent set, creating the context the agent needs to run.
      Specified by:
      addAgent in interface Context
      Parameters:
      agent - the agent to add
    • addAgents

      void addAgents(AgentSet agentSet)
      Adds each agent in an agent set to the current core's local agent set, creating the contexts the agents need to run.
      Specified by:
      addAgents in interface Context
      Parameters:
      agentSet - the agents to add
    • addAgents

      void addAgents(List<Agent> agentList)
      Adds each agent in a list to the current core's local agent set, creating the contexts the agents need to run.
      Specified by:
      addAgents in interface Context
      Parameters:
      agentList - the agents to add