Package jadex.rules.eca
Class ExpressionCondition
java.lang.Object
jadex.rules.eca.ExpressionCondition
- All Implemented Interfaces:
ICondition
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jadex.common.UnparsedExpression
The condition expression.protected jadex.javaparser.SimpleValueFetcher
The fetcher.Fields inherited from interface jadex.rules.eca.ICondition
FALSE, TRUE, TRUE_CONDITION
-
Constructor Summary
ConstructorsConstructorDescriptionExpressionCondition
(jadex.common.UnparsedExpression expression, jadex.common.IValueFetcher fetcher) Create a new ExpressionCondition. -
Method Summary
Modifier and TypeMethodDescriptionEvaluate the condition.jadex.common.UnparsedExpression
Get the expression.jadex.javaparser.SimpleValueFetcher
Get the fetcher.void
setExpression
(jadex.common.UnparsedExpression expression) Set the expression.void
setFetcher
(jadex.javaparser.SimpleValueFetcher fetcher) Set the fetcher.
-
Field Details
-
expression
protected jadex.common.UnparsedExpression expressionThe condition expression. -
fetcher
protected jadex.javaparser.SimpleValueFetcher fetcherThe fetcher.
-
-
Constructor Details
-
ExpressionCondition
public ExpressionCondition(jadex.common.UnparsedExpression expression, jadex.common.IValueFetcher fetcher) Create a new ExpressionCondition.
-
-
Method Details
-
evaluate
Evaluate the condition.- Specified by:
evaluate
in interfaceICondition
- Parameters:
event
- The event.- Returns:
- True, if condition is met (plus additional user data).
-
getExpression
public jadex.common.UnparsedExpression getExpression()Get the expression.- Returns:
- The expression.
-
setExpression
public void setExpression(jadex.common.UnparsedExpression expression) Set the expression.- Parameters:
expression
- The expression to set.
-
getFetcher
public jadex.javaparser.SimpleValueFetcher getFetcher()Get the fetcher.- Returns:
- The fetcher.
-
setFetcher
public void setFetcher(jadex.javaparser.SimpleValueFetcher fetcher) Set the fetcher.- Parameters:
fetcher
- The fetcher to set.
-