Class DefaultFunctionCollection
java.lang.Object
org.pipservices3.expressions.calculator.functions.FunctionCollection
org.pipservices3.expressions.calculator.functions.DefaultFunctionCollection
- All Implemented Interfaces:
IFunctionCollection
Implements a list filled with standard functions.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs this list and fills it with the standard functions. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkParamCount
(List<Variant> params, int expectedParamCount) Checks if params contains the correct number of function parameters (must be stored on the top of the params).protected Variant
getParameter
(List<Variant> params, int paramIndex) Gets function parameter by it's index.Methods inherited from class org.pipservices3.expressions.calculator.functions.FunctionCollection
add, clear, findByName, findIndexByName, get, getAll, length, remove, removeByName
-
Constructor Details
-
DefaultFunctionCollection
public DefaultFunctionCollection()Constructs this list and fills it with the standard functions.
-
-
Method Details
-
checkParamCount
protected void checkParamCount(List<Variant> params, int expectedParamCount) throws ExpressionException Checks if params contains the correct number of function parameters (must be stored on the top of the params).- Parameters:
params
- A list of function parameters.expectedParamCount
- The expected number of function parameters.- Throws:
ExpressionException
-
getParameter
Gets function parameter by it's index.- Parameters:
params
- A list of function parameters.paramIndex
- Index for the function parameter (0 for the first parameter).- Returns:
- Function parameter value.
-