Class EndsWithFunction

java.lang.Object
com.randomnoun.common.jexl.eval.function.EndsWithFunction
All Implemented Interfaces:
EvalFunction
Direct Known Subclasses:
EndsWithFunction

public class EndsWithFunction extends Object implements EvalFunction
Defines a endsWith() function. Returns true if the first argument to this function ends with the second argument.

The result of the function is of type Boolean.

  • Constructor Details

  • Method Details

    • evaluate

      public Object evaluate(String functionName, EvalContext context, List<Object> arguments) throws EvalException
      Implements the function as per the class description.
      Specified by:
      evaluate in interface EvalFunction
      Parameters:
      functionName - The name of the function to be evaluated (can be disregarded if this class only performs a single function)
      context - The context in which the function is being executed (could hold things like local variable values, current line number, etc...)
      arguments - The arguments passed to this function
      Returns:
      The result of the evaluation
      Throws:
      EvalException - An exception occurred during evaluation