Class StartsWithFunction
java.lang.Object
com.randomnoun.common.jexl.eval.function.StartsWithFunction
- All Implemented Interfaces:
EvalFunction
- Direct Known Subclasses:
StartsWithFunction
Defines a startsWith() function.
Returns true if the first value starts with the second value.
The result of the function is of type Boolean.
-
Field Summary
Fields inherited from interface com.randomnoun.common.jexl.eval.EvalFunction
logger
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
StartsWithFunction
public StartsWithFunction()
-
-
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 interfaceEvalFunction
- 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
-