jade.tools.sniffer
Class AgentList
java.lang.Object
|
+--jade.tools.sniffer.AgentList
- public class AgentList
- extends java.lang.Object
- implements java.io.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 |
AgentList()
Default constructor for the class AgentList |
|
Method Summary |
void |
addAgent(Agent agent)
Add an agent to the list. |
int |
getPos(java.lang.String agName)
Gives back the position inside the agentVector |
boolean |
isPresent(java.lang.String agName)
Verifies if an agent is present on the canvas |
void |
removeAgent(java.lang.String agentName)
Removes an agent from the list |
void |
removeAllAgents()
Clears the agent list |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
agentVector
public java.util.Vector agentVector
AgentList
public AgentList()
- Default constructor for the class AgentList
addAgent
public void addAgent(Agent agent)
- Add an agent to the list.
- Parameters:
agent - the agent to add
removeAgent
public void removeAgent(java.lang.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(java.lang.String agName)
- Verifies if an agent is present on the canvas
- Parameters:
agName - name of the agent to check for
getPos
public int getPos(java.lang.String agName)
- Gives back the position inside the agentVector
- Parameters:
agName - name of the agent for its position to search