Class StartsWithFunction

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

public class StartsWithFunction extends Object implements EvalFunction
Defines a startsWith() function. Returns true if the first value starts with the second value.

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