Package jadex.tools.comanalyzer
Class ParameterElement
- java.lang.Object
-
- jadex.tools.comanalyzer.ParameterElement
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable
public abstract class ParameterElement extends java.lang.Object implements java.io.Serializable, java.lang.ComparableBase class for agents and messages. This class provides the common elements such as the parameter attribute and the setters and getters for the parameters.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCLASSstatic java.lang.StringNAMEprotected java.util.Map<java.lang.String,java.lang.Object>parametersThe parameters.protected booleanvisibleThe visibility
-
Constructor Summary
Constructors Constructor Description ParameterElement()Default constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.lang.Object o)Elements are compared by their ids.booleanequals(java.lang.Object obj)Only messages with the same id are equal.abstract java.lang.StringgetId()java.lang.ObjectgetParameter(java.lang.String name)Returns a parameter value.java.util.MapgetParameters()Returns the parameter map.booleanhasParameter(java.lang.String name)Checks if a given parameter is contained by the parameter map.booleanisVisible()voidsetParameter(java.lang.String name, java.lang.Object value)Sets a parameter valuevoidsetParameters(java.util.Map map)Replaces the existing parameter map.voidsetVisible(boolean visible)Set the visbile state.java.lang.StringtoString()
-
-
-
Field Detail
-
CLASS
public static final java.lang.String CLASS
- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
visible
protected boolean visible
The visibility
-
parameters
protected java.util.Map<java.lang.String,java.lang.Object> parameters
The parameters.
-
-
Method Detail
-
getParameters
public java.util.Map getParameters()
Returns the parameter map.- Returns:
- The parameter map.
-
getParameter
public java.lang.Object getParameter(java.lang.String name)
Returns a parameter value.- Parameters:
name- The name of the parameter.- Returns:
- The value.
-
setParameters
public void setParameters(java.util.Map map)
Replaces the existing parameter map.- Parameters:
map- The parameter map.
-
setParameter
public void setParameter(java.lang.String name, java.lang.Object value)Sets a parameter value- Parameters:
name- The name of the parameter.value- The value.
-
hasParameter
public boolean hasParameter(java.lang.String name)
Checks if a given parameter is contained by the parameter map.- Parameters:
name- The name of the parameter.- Returns:
trueif the parameter is contained.
-
isVisible
public boolean isVisible()
- Returns:
- The visiblity.
-
setVisible
public void setVisible(boolean visible)
Set the visbile state.- Parameters:
visible- The visible state.
-
getId
public abstract java.lang.String getId()
- Returns:
- The id of the element.
-
compareTo
public int compareTo(java.lang.Object o)
Elements are compared by their ids.- Specified by:
compareToin interfacejava.lang.Comparable
-
equals
public boolean equals(java.lang.Object obj)
Only messages with the same id are equal.- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- Returns:
- The string representation for the element.
-
-