Package jadex.tools.comanalyzer
Class ComponentList
- java.lang.Object
- 
- jadex.tools.comanalyzer.ComponentList
 
- 
- All Implemented Interfaces:
- java.io.Serializable
 
 public class ComponentList extends java.lang.Object implements java.io.SerializableA list of Agents. This class provides methods to notify other classes which are implementing the IAgentListListener interface about adding, changing and removing of agents.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description ComponentList()Default constructor for the agent list.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAgent(Component agent)Adds an agent to the list.protected voidaddListener(IComponentListListener listener)Register for agent events.booleancontainsAgent(Component agent)Checks if an agent is contained in the agent list.protected voidfireAgentsAdded(Component[] agents)Notifies the listeners about the adding of agents.protected voidfireAgentsChanged(Component[] agents)Notifies the listeners about agents with changed visibility.protected voidfireAgentsRemoved(Component[] agents)Notifies the listeners about the removal of agents.ComponentgetAgent(IComponentIdentifier aid)Returns the agent from the list with the same identifierComponent[]getAgents()java.util.ListgetList()java.util.Iteratoriterator()voidremoveAgent(Component agent)voidremoveAllAgents()Clears the agent list and notifies all listenersintsize()
 
- 
- 
- 
Method Detail- 
addAgentpublic void addAgent(Component agent) Adds an agent to the list.- Parameters:
- agent- The agent to add.
 
 - 
removeAgentpublic void removeAgent(Component agent) - Parameters:
- agent- The agent to remove.
 
 - 
removeAllAgentspublic void removeAllAgents() Clears the agent list and notifies all listeners
 - 
getListpublic java.util.List getList() - Returns:
- The list of agents.
 
 - 
getAgentspublic Component[] getAgents() - Returns:
- The array of agents.
 
 - 
containsAgentpublic boolean containsAgent(Component agent) Checks if an agent is contained in the agent list.- Parameters:
- agent- The agent to check.
- Returns:
- trueif a specific agent is in the agentlist.
 
 - 
getAgentpublic Component getAgent(IComponentIdentifier aid) Returns the agent from the list with the same identifier- Parameters:
- aid- The agent identifier.
- Returns:
- The agent or nullif there is no agent with the same identifier in the list.
 
 - 
iteratorpublic java.util.Iterator iterator() - Returns:
- The agent list iterator.
 
 - 
sizepublic int size() - Returns:
- The size of the agentlist.
 
 - 
addListenerprotected void addListener(IComponentListListener listener) Register for agent events.- Parameters:
- listener- A class implementing the IAgentListListener interface.
 
 - 
fireAgentsRemovedprotected void fireAgentsRemoved(Component[] agents) Notifies the listeners about the removal of agents.- Parameters:
- agents- The removed agents.
 
 - 
fireAgentsAddedprotected void fireAgentsAdded(Component[] agents) Notifies the listeners about the adding of agents.- Parameters:
- agents- The added agents.
 
 - 
fireAgentsChangedprotected void fireAgentsChanged(Component[] agents) Notifies the listeners about agents with changed visibility.- Parameters:
- agents- The changed agents.
 
 
- 
 
-