Package jade.tools.sniffer
Class AgentList
- java.lang.Object
-
- jade.tools.sniffer.AgentList
-
- All Implemented Interfaces:
Serializable
public class AgentList extends Object implements Serializable
The List for the agents on the Agent Canvas. Implements Serializable for saving data to the binary snapshot file.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AgentList()Default constructor for the class AgentList
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAgent(Agent agent)Add an agent to the list.IteratorgetAgents()intgetPos(String agName)Gives back the position inside the agentsbooleanisPresent(String agName)Verifies if an agent is present on the canvasvoidremoveAgent(String agentName)Removes an agent from the listvoidremoveAllAgents()Clears the agent listintsize()
-
-
-
Field Detail
-
agents
public List agents
-
-
Method Detail
-
addAgent
public void addAgent(Agent agent)
Add an agent to the list.- Parameters:
agent- the agent to add
-
removeAgent
public void removeAgent(String agentName)
Removes an agent from the list- Parameters:
agentName- name of the agent to remove
-
removeAllAgents
public void removeAllAgents()
Clears the agent list
-
isPresent
public boolean isPresent(String agName)
Verifies if an agent is present on the canvas- Parameters:
agName- name of the agent to check for
-
getPos
public int getPos(String agName)
Gives back the position inside the agents- Parameters:
agName- name of the agent for its position to search
-
getAgents
public Iterator getAgents()
-
size
public int size()
-
-