Package com.grapecity.documents.excel
Class AsyncCustomFunction
java.lang.Object
com.grapecity.documents.excel.CustomFunction
com.grapecity.documents.excel.AsyncCustomFunction
Represents the base type for async custom function.
-
Field Summary
Fields inherited from class com.grapecity.documents.excel.CustomFunction
name -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAsyncCustomFunction(String name, FunctionValueType result) Initializes an instance of an async custom function.protectedAsyncCustomFunction(String name, FunctionValueType result, Parameter[] parameters) Initializes an instance of an async custom function.protectedAsyncCustomFunction(String name, String description, FunctionValueType result, Parameter[] parameters) Initializes an instance of an async custom function. -
Method Summary
Modifier and TypeMethodDescriptionfinal Objectevaluate(Object[] arguments, ICalcContext context) Calculate the function.protected abstract CompletableFuture<Object>evaluateAsync(Object[] arguments, ICalcContext context) Calculate the function asynchronously.Methods inherited from class com.grapecity.documents.excel.CustomFunction
getIsVolatile, setIsVolatile
-
Constructor Details
-
AsyncCustomFunction
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
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
Calculate the function.- Specified by:
evaluatein classCustomFunction- Parameters:
arguments- the value collection of the argumentscontext- 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 argumentscontext- The context of the calculation.- Returns:
- The result of the function.
-