csheets.core.formula
Interface Function

All Known Implementing Classes:
And, Average, Count, Do, Factorial, False, If, Not, NumericFunction, Or, Sum, True

public interface Function

A function that can be used in a formula.

Author:
Einar Pehrson

Method Summary
 Value applyTo(Expression[] args)
          Invokes the function using the given arguments and returns the result.
 String getIdentifier()
          Returns the operator's string identirifer.
 FunctionParameter[] getParameters()
          Returns the parameters of the function.
 boolean isVarArg()
          Returns whether the function accepts a variable number of arguments, i.e. whether the function's parameter list is unbounded.
 

Method Detail

getIdentifier

String getIdentifier()
Returns the operator's string identirifer.

Returns:
a string representation of the operator.

applyTo

Value applyTo(Expression[] args)
              throws IllegalValueTypeException
Invokes the function using the given arguments and returns the result.

Returns:
the result of the operation
Throws:
IllegalValueTypeException

getParameters

FunctionParameter[] getParameters()
Returns the parameters of the function.

Returns:
the parameters of the function

isVarArg

boolean isVarArg()
Returns whether the function accepts a variable number of arguments, i.e. whether the function's parameter list is unbounded.

Returns:
true if the function accepts a variable number of arguments