Class DefaultFunctionCollection

java.lang.Object
org.pipservices3.expressions.calculator.functions.FunctionCollection
org.pipservices3.expressions.calculator.functions.DefaultFunctionCollection
All Implemented Interfaces:
IFunctionCollection

public class DefaultFunctionCollection extends FunctionCollection
Implements a list filled with standard functions.
  • 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

      protected Variant getParameter(List<Variant> params, int paramIndex)
      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.