Class FunctionRegistry

java.lang.Object
com.pervasive.datarush.functions.FunctionRegistry

public class FunctionRegistry extends Object
Stores a list of functions registered by the FunctionTypeResoultionProvider, and provides a method for calling those functions.
  • Method Details

    • getInstance

      public static FunctionRegistry getInstance()
      Get an instance of the FunctionRegistry.
      Returns:
      An instance of the FunctionRegistry
    • getFunction

      public ScalarValuedFunction getFunction(String name, ScalarValuedFunction[] arguments)
      Invoke a ScalarValuedFunction by name, using the supplied arguments.
      Parameters:
      name - The registered name of the function.
      arguments - The arguments to pass to the function.
      Returns:
      The ScalarValuedFunction.
    • getFunctionDescriptions

      public Collection<FunctionDescription> getFunctionDescriptions()
      Return a list of descriptions of all available functions.
      Returns:
    • getFunctionDescriptionsByCategory

      public Map<String,Collection<FunctionDescription>> getFunctionDescriptionsByCategory()
      Returns a list of descriptions of all available functions, organized by category.
      Returns:
    • getFunctionDescription

      public FunctionDescription getFunctionDescription(String name, int argCount)
      Create a FunctionDescription for a given function.
      Parameters:
      name - The name of the function
      argCount - The number of arguments the function takes
      Returns:
      The FunctionDescription of the function