Package jadex.bdi.model
Class MParameter
java.lang.Object
jadex.bdi.model.MElement
jadex.bdi.model.MParameter
- Direct Known Subclasses:
MPlanParameter
Parameter model.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The message direction.static enum
The message direction. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jadex.common.UnparsedExpression
The binding options.protected jadex.common.ClassInfo
The type (if explicitly specified).protected MParameter.Direction
The direction.static Map
<String, MParameter.Direction> protected MParameter.EvaluationMode
The direction.static Map
<String, MParameter.EvaluationMode> protected List
<jadex.rules.eca.EventType> The ECA events that may denote changes in the parameter value(s).protected jadex.common.FieldInfo
The field target.protected jadex.common.MethodInfo
The method targets.protected jadex.common.MethodInfo
protected Boolean
Flag if is multi.protected boolean
The optional flag.The service mappings.protected jadex.common.UnparsedExpression
The update rate.protected jadex.common.UnparsedExpression
The default value.protected List
<jadex.common.UnparsedExpression> The default values (multi).Fields inherited from class jadex.bdi.model.MElement
CAPABILITY_SEPARATOR, description, name
-
Constructor Summary
ConstructorsConstructorDescriptionBean Constructor.MParameter
(jadex.common.FieldInfo ftarget) Create a new parameter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDefaultValues
(jadex.common.UnparsedExpression fact) The value to set.void
addEvent
(jadex.rules.eca.EventType event) Add an event.void
addServiceMapping
(String mapping) Add a service mapping.jadex.common.UnparsedExpression
Get the bindingOptions.jadex.common.ClassInfo
getClazz()
Get the clazz.jadex.common.UnparsedExpression
Get the value.List
<jadex.common.UnparsedExpression> Get the value.Get the direction.Get the evaluationmode.List
<jadex.rules.eca.EventType> Get the events.jadex.common.FieldInfo
getField()
Get the field (for field-backed beliefs).jadex.common.MethodInfo
Get the getter method (for method-backed beliefs).Get the service mappings.jadex.common.MethodInfo
Get the setter method (for method-backed beliefs).Class
<?> getType
(ClassLoader cl) Get the class of the belief.jadex.common.UnparsedExpression
Get the updaterate.long
Get/Evaluate the updaterate value.getValue
(Object object, ClassLoader cl) Get the value of the belief.void
initEvents
(MParameterElement owner) Init the event, when loaded from xml.boolean
isArray()
Test if parameter is of array type.boolean
Test if this belief refers to a field.boolean
isMulti
(ClassLoader cl) Get the multi.boolean
Get the optional flag.void
setBindingOptions
(jadex.common.UnparsedExpression bindingoptions) The binding options to set.void
setClazz
(jadex.common.ClassInfo clazz) The clazz to set.void
setDefaultValue
(jadex.common.UnparsedExpression value) The value to set.void
setDefaultValues
(List<jadex.common.UnparsedExpression> values) The value to set.void
setDirection
(MParameter.Direction direction) The direction to set.void
setEvaluationMode
(MParameter.EvaluationMode evaluationmode) The evaluationmode to set.void
The events to set.void
setGetter
(jadex.common.MethodInfo mgetter) Set the mgetter.void
setMulti
(boolean multi) The multi to set.void
setOptional
(boolean optional) Set the optional flag.void
setServiceMappings
(List<String> servicemappings) Set the service mappings.void
setSetter
(jadex.common.MethodInfo msetter) Set the msetter.void
setUpdateRate
(jadex.common.UnparsedExpression updaterate) The updaterate to set.boolean
setValue
(Object object, Object value, ClassLoader cl) Set the value of the parameter.Methods inherited from class jadex.bdi.model.MElement
equals, getCapabilityName, getDescription, getElementName, getName, hashCode, internalName, setDescription, setFlatName, setName, toString
-
Field Details
-
dirs
-
evas
-
ftarget
protected jadex.common.FieldInfo ftargetThe field target. -
mgetter
protected jadex.common.MethodInfo mgetterThe method targets. -
msetter
protected jadex.common.MethodInfo msetter -
multi
Flag if is multi. -
direction
The direction. -
clazz
protected jadex.common.ClassInfo clazzThe type (if explicitly specified). -
value
protected jadex.common.UnparsedExpression valueThe default value. -
values
The default values (multi). -
optional
protected boolean optionalThe optional flag. -
bindingoptions
protected jadex.common.UnparsedExpression bindingoptionsThe binding options. -
evaluationmode
The direction. -
updaterate
protected jadex.common.UnparsedExpression updaterateThe update rate. -
events
The ECA events that may denote changes in the parameter value(s). -
servicemappings
The service mappings.
-
-
Constructor Details
-
MParameter
public MParameter()Bean Constructor. -
MParameter
public MParameter(jadex.common.FieldInfo ftarget) Create a new parameter.
-
-
Method Details
-
setGetter
public void setGetter(jadex.common.MethodInfo mgetter) Set the mgetter.- Parameters:
mgetter
- The mgetter to set.
-
setSetter
public void setSetter(jadex.common.MethodInfo msetter) Set the msetter.- Parameters:
msetter
- The msetter to set.
-
isFieldParameter
public boolean isFieldParameter()Test if this belief refers to a field.- Returns:
- True if is a field belief.
-
getValue
Get the value of the belief.- Parameters:
object
- The rparameterelement (such as goal).cl
- The classloader.
-
setValue
Set the value of the parameter.- Parameters:
object
- The rparameterelement (such as goal).value
- The value.cl
- The classloader.
-
getType
Get the class of the belief. -
getField
public jadex.common.FieldInfo getField()Get the field (for field-backed beliefs). -
getGetter
public jadex.common.MethodInfo getGetter()Get the getter method (for method-backed beliefs). -
getSetter
public jadex.common.MethodInfo getSetter()Get the setter method (for method-backed beliefs). -
isMulti
Get the multi.- Returns:
- The multi.
-
setMulti
public void setMulti(boolean multi) The multi to set.- Parameters:
multi
- The multi to set
-
isArray
public boolean isArray()Test if parameter is of array type. -
getDirection
Get the direction.- Returns:
- The direction
-
setDirection
The direction to set.- Parameters:
direction
- The direction to set
-
getClazz
public jadex.common.ClassInfo getClazz()Get the clazz.- Returns:
- The clazz
-
setClazz
public void setClazz(jadex.common.ClassInfo clazz) The clazz to set.- Parameters:
clazz
- The clazz to set
-
getDefaultValue
public jadex.common.UnparsedExpression getDefaultValue()Get the value.- Returns:
- The value
-
setDefaultValue
public void setDefaultValue(jadex.common.UnparsedExpression value) The value to set.- Parameters:
value
- The value to set
-
getDefaultValues
Get the value.- Returns:
- The value
-
setDefaultValues
The value to set.- Parameters:
value
- The value to set
-
addDefaultValues
public void addDefaultValues(jadex.common.UnparsedExpression fact) The value to set.- Parameters:
value
- The value to set
-
isOptional
public boolean isOptional()Get the optional flag.- Returns:
- The otpional flag
-
setOptional
public void setOptional(boolean optional) Set the optional flag.- Parameters:
optional
- The value to set
-
getBindingOptions
public jadex.common.UnparsedExpression getBindingOptions()Get the bindingOptions.- Returns:
- The bindingOptions
-
setBindingOptions
public void setBindingOptions(jadex.common.UnparsedExpression bindingoptions) The binding options to set.- Parameters:
bindingoptions
- The bindingOptions to set
-
getEvaluationMode
Get the evaluationmode.- Returns:
- The evaluationmode
-
setEvaluationMode
The evaluationmode to set.- Parameters:
evaluationmode
- The evaluationmode to set
-
getUpdateRate
public jadex.common.UnparsedExpression getUpdateRate()Get the updaterate.- Returns:
- The updaterate
-
setUpdateRate
public void setUpdateRate(jadex.common.UnparsedExpression updaterate) The updaterate to set.- Parameters:
updaterate
- The updaterate to set
-
getUpdaterateValue
public long getUpdaterateValue()Get/Evaluate the updaterate value.- Parameters:
agent
- The agent.- Returns:
- The update rate.
-
getEvents
Get the events.- Returns:
- The events.
-
initEvents
Init the event, when loaded from xml. -
setEvents
The events to set.- Parameters:
events
- The events to set
-
addEvent
public void addEvent(jadex.rules.eca.EventType event) Add an event.- Parameters:
event
- The event.
-
getServiceMappings
Get the service mappings. -
setServiceMappings
Set the service mappings. -
addServiceMapping
Add a service mapping.
-