[]
        
(Showing Draft Content)

AsyncCustomFunction

Class AsyncCustomFunction

java.lang.Object
com.grapecity.documents.excel.CustomFunction
com.grapecity.documents.excel.AsyncCustomFunction

public abstract class AsyncCustomFunction extends CustomFunction
Represents the base type for async custom function.
  • Constructor Details

    • AsyncCustomFunction

      protected AsyncCustomFunction(String name, FunctionValueType result)
      Initializes an instance of an async custom function.
      Parameters:
      name - The name of the custom function.
      result - Specifies the return type for the custom function.
    • AsyncCustomFunction

      protected AsyncCustomFunction(String name, FunctionValueType result, Parameter[] parameters)
      Initializes an instance of an async custom function.
      Parameters:
      name - The name of the custom function.
      result - Specifies the return type for the custom function.
      parameters - Specifies the parmeters for the custom function.
    • AsyncCustomFunction

      protected AsyncCustomFunction(String name, String description, FunctionValueType result, Parameter[] parameters)
      Initializes an instance of an async custom function.
      Parameters:
      name - The name of the custom function.
      description - The description of the custom function.
      result - Specifies the return type for the custom function.
      parameters - Specifies the parmeters for the custom function.
  • Method Details

    • evaluate

      public final Object evaluate(Object[] arguments, ICalcContext context)
      Calculate the function.
      Specified by:
      evaluate in class CustomFunction
      Parameters:
      arguments - the value collection of the arguments
      context - the context of the calculation.
      Returns:
      the result of the function.
    • evaluateAsync

      protected abstract CompletableFuture<Object> evaluateAsync(Object[] arguments, ICalcContext context)
      Calculate the function asynchronously.
      Parameters:
      arguments - The value collection of the arguments
      context - The context of the calculation.
      Returns:
      The result of the function.