Class JexlEvaluateFunctions


  • public class JexlEvaluateFunctions
    extends java.lang.Object
    Functions to use JexlEngine to evaluate a given formula string against the current context
    Author:
    cgallen
    • Constructor Summary

      Constructors 
      Constructor Description
      JexlEvaluateFunctions​(org.apache.commons.jexl2.JexlContext context, org.apache.commons.jexl2.JexlEngine jexl)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Double evaluate​(java.lang.String formula)
      Uses the JexlEngine to evaluate a string constant as a Jexl expression
      • Methods inherited from class java.lang.Object

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

      • JexlEvaluateFunctions

        public JexlEvaluateFunctions​(org.apache.commons.jexl2.JexlContext context,
                                     org.apache.commons.jexl2.JexlEngine jexl)
    • Method Detail

      • evaluate

        public java.lang.Double evaluate​(java.lang.String formula)
        Uses the JexlEngine to evaluate a string constant as a Jexl expression
        Parameters:
        formula - string expression to evaluate
        Returns:
        double value or NaN if formula cannot be evaluated