DelegatedFunction

Defines a delegate to implement a function.

Implements: IFunction

Description

The DelegatedFunction class allows you to define a delegate to implement a function.

Constructors

Constructs this function class with the specified parameters.

public DelegatedFunction(String name, FunctionCalculator calculator)

  • name: string - name of this function.
  • calculator: FunctionCalculator - function calculator delegate.

Properties

name

Function’s name.

private final String _name

Instance methods

getName

Function’s calculation method.

public String getName()

  • returns: String - name.

setName

Function’s calculation method.

public void setName(String value)

  • value: String - name.

calculate

Function’s calculation method.

public Variant[] calculate(List<Variant> params, IVariantOperations variantOperations) throws ExpressionException

  • params: List<Variant> - array with function parameters.
  • variantOperations: IVariantOperations - variants operations manager.
  • returns: Variant - returned function’s result.