Package jadex.tools.comanalyzer
Class Component
- java.lang.Object
- 
- jadex.tools.comanalyzer.ParameterElement
- 
- jadex.tools.comanalyzer.Component
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Comparable
 
 public class Component extends ParameterElement The Agent object.- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.util.ListAGENT_ATTRIBUTESThe allowed message attributes.static java.lang.StringAIDstatic java.lang.StringDESCRIPTIONstatic ComponentDUMMY_COMPONENTThe dummy agentstatic java.lang.StringDUMMY_NAMEThe name for the dummy agentstatic java.lang.StringIDThe id of the elementstatic java.lang.StringMESSAGE_COUNTstatic java.lang.StringMESSAGE_VISIBLEprotected java.util.ListmessagesThe messages send or received by the agentstatic intNO_MESSAGESstatic java.lang.StringSTATEstatic java.lang.StringSTATE_DEADstatic java.lang.StringSTATE_DUMMYstatic java.lang.StringSTATE_IGNOREDstatic java.lang.StringSTATE_OBSERVEDstatic java.lang.StringSTATE_REMOTE- 
Fields inherited from class jadex.tools.comanalyzer.ParameterElementCLASS, NAME, parameters, visible
 
- 
 - 
Constructor SummaryConstructors Constructor Description Component()Constructor for a dummy agent which represents every agent not present on the canvas.Component(IComponentDescription desc)Constructor for any named agent to be put on the Agent Canvas
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMessage(Message message)Adds a message to the agent.booleanapplyFilter(ComponentFilter[] filter, boolean zeromessages)Applies a filter to the agent and returns if the visibility has changed.intcompareTo(java.lang.Object o)Agents are compared by their names.static java.lang.String[]getDeclaredAttributes()IComponentDescriptiongetDescription()java.lang.StringgetId()java.util.ListgetMessages()Returns the messages send or received by the agent.java.lang.ObjectgetParameter(java.lang.String name)Returns the parameter with the given name.java.util.MapgetParameters()Returns the parameter map.java.lang.StringgetState()voidremoveAllMessages()Removes all messages send or received by the agent.voidremoveMessage(Message message)Removes a message from the agent.voidsetMessages(java.util.List messages)Set the messages.voidsetState(java.lang.String state)java.lang.StringtoString()- 
Methods inherited from class jadex.tools.comanalyzer.ParameterElementequals, hasParameter, isVisible, setParameter, setParameters, setVisible
 
- 
 
- 
- 
- 
Field Detail- 
DUMMY_COMPONENTpublic static final Component DUMMY_COMPONENT The dummy agent
 - 
DUMMY_NAMEpublic static final java.lang.String DUMMY_NAME The name for the dummy agent- See Also:
- Constant Field Values
 
 - 
STATEpublic static final java.lang.String STATE - See Also:
- Constant Field Values
 
 - 
IDpublic static final java.lang.String ID The id of the element- See Also:
- Constant Field Values
 
 - 
AIDpublic static final java.lang.String AID - See Also:
- Constant Field Values
 
 - 
DESCRIPTIONpublic static final java.lang.String DESCRIPTION - See Also:
- Constant Field Values
 
 - 
MESSAGE_COUNTpublic static final java.lang.String MESSAGE_COUNT - See Also:
- Constant Field Values
 
 - 
MESSAGE_VISIBLEpublic static final java.lang.String MESSAGE_VISIBLE - See Also:
- Constant Field Values
 
 - 
NO_MESSAGESpublic static final int NO_MESSAGES - See Also:
- Constant Field Values
 
 - 
STATE_DEADpublic static final java.lang.String STATE_DEAD - See Also:
- Constant Field Values
 
 - 
STATE_OBSERVEDpublic static final java.lang.String STATE_OBSERVED - See Also:
- Constant Field Values
 
 - 
STATE_IGNOREDpublic static final java.lang.String STATE_IGNORED - See Also:
- Constant Field Values
 
 - 
STATE_DUMMYpublic static final java.lang.String STATE_DUMMY - See Also:
- Constant Field Values
 
 - 
STATE_REMOTEpublic static final java.lang.String STATE_REMOTE - See Also:
- Constant Field Values
 
 - 
AGENT_ATTRIBUTESpublic static final java.util.List AGENT_ATTRIBUTES The allowed message attributes.
 - 
messagesprotected java.util.List messages The messages send or received by the agent
 
- 
 - 
Constructor Detail- 
Componentpublic Component() Constructor for a dummy agent which represents every agent not present on the canvas.
 - 
Componentpublic Component(IComponentDescription desc) Constructor for any named agent to be put on the Agent Canvas
 
- 
 - 
Method Detail- 
getDeclaredAttributespublic static final java.lang.String[] getDeclaredAttributes() - Returns:
- The declared agent attributes.
 
 - 
getParameterspublic java.util.Map getParameters() Returns the parameter map.- Overrides:
- getParametersin class- ParameterElement
- Returns:
- The parameter map.
 
 - 
getParameterpublic java.lang.Object getParameter(java.lang.String name) Returns the parameter with the given name.- Overrides:
- getParameterin class- ParameterElement
- Parameters:
- name- The parameter name.
- Returns:
- The parameter object
 
 - 
getDescriptionpublic IComponentDescription getDescription() - Returns:
- The component description.
 
 - 
getStatepublic java.lang.String getState() - Returns:
- The state.
 
 - 
setStatepublic void setState(java.lang.String state) - Parameters:
- state- The state to set.
 
 - 
applyFilterpublic boolean applyFilter(ComponentFilter[] filter, boolean zeromessages) Applies a filter to the agent and returns if the visibility has changed.- Parameters:
- filter- The array of filters to apply to.
- zeromessages-- Trueif the zero message filter should be applied
- Returns:
- True if visibility has changed.
 
 - 
getMessagespublic java.util.List getMessages() Returns the messages send or received by the agent.- Returns:
- The array of messages.
 
 - 
setMessagespublic void setMessages(java.util.List messages) Set the messages.- Parameters:
- messages- The messages.
 
 - 
addMessagepublic void addMessage(Message message) Adds a message to the agent.- Parameters:
- message- The message to add to the agent.
 
 - 
removeMessagepublic void removeMessage(Message message) Removes a message from the agent.- Parameters:
- message- The message to remove.
 
 - 
removeAllMessagespublic void removeAllMessages() Removes all messages send or received by the agent.
 - 
getIdpublic java.lang.String getId() - Specified by:
- getIdin class- ParameterElement
- Returns:
- The id of the element.
 
 - 
compareTopublic int compareTo(java.lang.Object o) Agents are compared by their names. Only the dummy agent is always the first in line.- Specified by:
- compareToin interface- java.lang.Comparable
- Overrides:
- compareToin class- ParameterElement
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- ParameterElement
- Returns:
- The string representation.
 
 
- 
 
-