Class MVELCondition

  • All Implemented Interfaces:
    Condition

    public class MVELCondition
    extends java.lang.Object
    implements Condition
    This class is an implementation of Condition that uses MVEL to evaluate the condition.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean evaluate​(Facts facts)
      Evaluate the condition according to the known facts.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MVELCondition

        public MVELCondition​(java.lang.String expression)
        Create a new MVELCondition.
        Parameters:
        expression - the condition written in expression language
      • MVELCondition

        public MVELCondition​(java.lang.String expression,
                             org.mvel2.ParserContext parserContext)
        Create a new MVELCondition.
        Parameters:
        expression - the condition written in expression language
        parserContext - the MVEL parser context
    • Method Detail

      • evaluate

        public boolean evaluate​(Facts facts)
        Description copied from interface: Condition
        Evaluate the condition according to the known facts.
        Specified by:
        evaluate in interface Condition
        Parameters:
        facts - known when evaluating the rule.
        Returns:
        true if the rule should be triggered, false otherwise