Class ExpressionCondition

java.lang.Object
jadex.rules.eca.ExpressionCondition
All Implemented Interfaces:
ICondition

public class ExpressionCondition extends Object implements ICondition
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected 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

    Constructors
    Constructor
    Description
    ExpressionCondition(jadex.common.UnparsedExpression expression, jadex.common.IValueFetcher fetcher)
    Create a new ExpressionCondition.
  • Method Summary

    Modifier and Type
    Method
    Description
    jadex.future.IFuture<jadex.common.Tuple2<Boolean,Object>>
    Evaluate 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • expression

      protected jadex.common.UnparsedExpression expression
      The condition expression.
    • fetcher

      protected jadex.javaparser.SimpleValueFetcher fetcher
      The fetcher.
  • Constructor Details

    • ExpressionCondition

      public ExpressionCondition(jadex.common.UnparsedExpression expression, jadex.common.IValueFetcher fetcher)
      Create a new ExpressionCondition.
  • Method Details

    • evaluate

      public jadex.future.IFuture<jadex.common.Tuple2<Boolean,Object>> evaluate(IEvent event)
      Evaluate the condition.
      Specified by:
      evaluate in interface ICondition
      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.