net.christopherschultz.evaluator.function
Class CountMatchesFunction
java.lang.Object
net.christopherschultz.evaluator.StandardFunction
net.christopherschultz.evaluator.function.CountMatchesFunction
- All Implemented Interfaces:
- Function
public class CountMatchesFunction
- extends StandardFunction
Returns the number (int) of arguments that appear in the
first (array or list) argument.
Usage: countMatches(a:array or list, element1, element2, ... elementN)
- Version:
- $Revision: 1.2 $ $Date: 2008-06-20 22:58:48 $
- Author:
- Chris Schultz
CountMatchesFunction
public CountMatchesFunction()
call
public Object call(EvaluationContext ec,
String functionName,
Object[] args)
throws EvaluationException
- Description copied from class:
StandardFunction
- Calls this function with standard argument evaluation semantics.
- Specified by:
call
in class StandardFunction
- Parameters:
ec
- The EvaluationContext in which this function is being called.functionName
- The name of the function being invoked.args
- The argument values to pass to this function.
- Returns:
- The result of the function.
- Throws:
EvaluationException
- If there is an error during function
execution.