Interface LongAgentGraphNode
- All Superinterfaces:
AgentGraphNode,GeometricGraphNode
- All Known Implementing Classes:
LongAgentGraphNodeImpl,RailNode
Interface to be implemented by all classes that can be values of graph nodes
of
LongAgentsEnvironment.- Author:
- Andrey Korotin
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddOccupyingAgent(LongAgent<?, ?> longAgent) Adds the specified agent to collection of occupying agents (used to prevent the overlay of agents), e.g.Returns an unmodifiable list of occupying agents that are currently occupying this node.voidremoveAllOccurrencesOccupyingAgent(LongAgent<?, ?> longAgent) Removes the all Occurrences of specified agent from collection of occupying agents (used to prevent the overlay of agents), e.g.voidremoveOccupyingAgent(LongAgent<?, ?> longAgent) Removes the specified agent from collection of occupying agents (used to prevent the overlay of agents), e.g.Methods inherited from interface com.amalgamasimulation.graphagent.AgentGraphNode
addAgent, addCallbackPosition, afterAgentEntered, beforeAgentExited, clearCallbackPositions, containsAgent, getAgents, getCallbackPositions, onAgentReachedPosition, removeAgent, removeCallbackPositionMethods inherited from interface com.amalgamasimulation.graphagent.GeometricGraphNode
getPoint
-
Method Details
-
addOccupyingAgent
Adds the specified agent to collection of occupying agents (used to prevent the overlay of agents), e.g. when the agent enters this node or jumps to it.- Parameters:
longAgent- agent being added
-
removeOccupyingAgent
Removes the specified agent from collection of occupying agents (used to prevent the overlay of agents), e.g. when the agent leaves this node or is completely removed from graph environment.- Parameters:
longAgent- agent being removed
-
removeAllOccurrencesOccupyingAgent
Removes the all Occurrences of specified agent from collection of occupying agents (used to prevent the overlay of agents), e.g. when the agent leaves this node or is completely removed from graph environment.- Parameters:
longAgent- agent being removed
-
getOccupyingAgents
Returns an unmodifiable list of occupying agents that are currently occupying this node.- Returns:
- unmodifiable list of occupying agents that are currently occupying this node
-