Package org.apache.felix.gogo.runtime
Class Expression.Function
java.lang.Object
org.apache.felix.gogo.runtime.Expression.Function
- Enclosing class:
Expression
Abstract definition of a supported expression function. A function is
defined by a name, the number of parameters and the actual processing
implementation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract BigDecimal
eval
(List<BigDecimal> parameters) Implementation for this function.getName()
int
toString()
-
Constructor Details
-
Function
Creates a new function with given name and parameter count.- Parameters:
name
- The name of the function.numParams
- The number of parameters for this function.
-
-
Method Details
-
getName
-
getNumParams
public int getNumParams() -
eval
-
eval
Implementation for this function.- Parameters:
parameters
- Parameters will be passed by the expression evaluator as aList
ofBigDecimal
values.- Returns:
- The function must return a new
BigDecimal
value as a computing result.
-
toString
-