Package jadex.rules.eca
Class ExpressionCondition
- java.lang.Object
-
- jadex.rules.eca.ExpressionCondition
-
- All Implemented Interfaces:
ICondition
public class ExpressionCondition extends java.lang.Object implements ICondition
-
-
Field Summary
Fields Modifier and Type Field Description protected UnparsedExpression
expression
The condition expression.protected SimpleValueFetcher
fetcher
The fetcher.-
Fields inherited from interface jadex.rules.eca.ICondition
FALSE, TRUE, TRUE_CONDITION
-
-
Constructor Summary
Constructors Constructor Description ExpressionCondition(UnparsedExpression expression, IValueFetcher fetcher)
Create a new ExpressionCondition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<Tuple2<java.lang.Boolean,java.lang.Object>>
evaluate(IEvent event)
Evaluate the condition.UnparsedExpression
getExpression()
Get the expression.SimpleValueFetcher
getFetcher()
Get the fetcher.void
setExpression(UnparsedExpression expression)
Set the expression.void
setFetcher(SimpleValueFetcher fetcher)
Set the fetcher.
-
-
-
Field Detail
-
expression
protected UnparsedExpression expression
The condition expression.
-
fetcher
protected SimpleValueFetcher fetcher
The fetcher.
-
-
Constructor Detail
-
ExpressionCondition
public ExpressionCondition(UnparsedExpression expression, IValueFetcher fetcher)
Create a new ExpressionCondition.
-
-
Method Detail
-
evaluate
public IFuture<Tuple2<java.lang.Boolean,java.lang.Object>> evaluate(IEvent event)
Evaluate the condition.- Specified by:
evaluate
in interfaceICondition
- Parameters:
event
- The event.- Returns:
- True, if condition is met (plus additional user data).
-
getExpression
public UnparsedExpression getExpression()
Get the expression.- Returns:
- The expression.
-
setExpression
public void setExpression(UnparsedExpression expression)
Set the expression.- Parameters:
expression
- The expression to set.
-
getFetcher
public SimpleValueFetcher getFetcher()
Get the fetcher.- Returns:
- The fetcher.
-
setFetcher
public void setFetcher(SimpleValueFetcher fetcher)
Set the fetcher.- Parameters:
fetcher
- The fetcher to set.
-
-