Class JexlEvaluateFunctions


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

      • JexlEvaluateFunctions

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

      • evaluate

        public Double evaluate​(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