Package com.grapecity.documents.excel
Class CustomFunction
java.lang.Object
com.grapecity.documents.excel.CustomFunction
- Direct Known Subclasses:
AsyncCustomFunction
Represents the base type for custom function.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCustomFunction(String name, FunctionValueType result) Initializes an instance of a custom function.CustomFunction(String name, FunctionValueType result, Parameter[] parameters) Initializes an instance of a custom function.CustomFunction(String name, String description, FunctionValueType result, Parameter[] parameters) Initializes an instance of a custom function. -
Method Summary
Modifier and TypeMethodDescriptionabstract Objectevaluate(Object[] arguments, ICalcContext context) Calculate the function.booleanGets whether to allow custom formula use cache.voidsetIsVolatile(boolean aVolatile) Sets whether to allow custom formula use cache.
-
Field Details
-
name
-
-
Constructor Details
-
CustomFunction
Initializes an instance of a custom function.- Parameters:
name- The name of the custom function.result- Specifies the return type for the custom function.
-
CustomFunction
Initializes an instance of a 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.
-
CustomFunction
public CustomFunction(String name, String description, FunctionValueType result, Parameter[] parameters) Initializes an instance of a 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
-
getIsVolatile
public boolean getIsVolatile()Gets whether to allow custom formula use cache.- Returns:
trueif this node is marked as volatile,falseotherwise.
-
setIsVolatile
public void setIsVolatile(boolean aVolatile) Sets whether to allow custom formula use cache.- Parameters:
aVolatile-trueto mark this node as volatile,falseotherwise.
-
evaluate
Calculate the function.- Parameters:
arguments- the value collection of the argumentscontext- the context of the calculation.- Returns:
- the result of the function.
-