| java.lang.Object org.osbl.agent.model.condition.PropertyCondition
All known Subclasses: org.osbl.agent.model.condition.EnumCondition, org.osbl.agent.model.condition.FieldCondition,
PropertyCondition | public class PropertyCondition implements Condition(Code) | | This evaluates a condition related to one of the fields, or properties,
of the subject instance (passed in the
org.osbl.agent.model.RuleContext runtime-context ).
Thus, the specified propertyMeta MUST be a valid property of the subject class.
Users of this condition specify the property via a
org.conform.PropertyMeta propertyMeta ,
specify the value to compare to, and provide an suitable
Operator operator for the
evaluation of this two operands.
author: Sebastian Nozzi. |
evaluate | public boolean evaluate(RuleContext context)(Code) | | Uses the specified operator to perform an evaluation using the specified
propertyMeta and the valueToCompareTo as operands, returning the result
of such evaluation.
If the valueToCompareTo is not set or null, returns false without evaluation.
Parameters: context - the context true, if evaluate See Also: org.osbl.agent.model.condition.Condition.evaluate(org.osbl.agent.model.RuleContext) |
getBeanMetaClassName | public String getBeanMetaClassName()(Code) | | Gets the bean meta class name.
the bean meta class name |
getOperator | public Operator getOperator()(Code) | | Gets the operator.
the operator |
getPropertyMetaName | public String getPropertyMetaName()(Code) | | Gets the property meta name.
the property meta name |
getValueToCompareTo | public Object getValueToCompareTo()(Code) | | Gets the value to compare to in the evaluation (the right operand).
the value to compare to |
setBeanMetaClassName | public void setBeanMetaClassName(String beanMetaClassName)(Code) | | Sets the bean meta class name.
Parameters: beanMetaClassName - the new bean meta class name |
setOperator | public void setOperator(Operator operator)(Code) | | Sets the operator.
Parameters: operator - the new operator |
setPropertyMetaName | public void setPropertyMetaName(String propertyMetaName)(Code) | | Sets the property meta name.
Parameters: propertyMetaName - the new property meta name |
setValueToCompareTo | public void setValueToCompareTo(Object valueToCompareTo)(Code) | | Sets the value to compare to in the evaluation (the right operand).
Parameters: valueToCompareTo - the new value to compare to |
|
|