public abstract class Expression.Function extends Object
| Constructor and Description |
|---|
Expression.Function(String name,
int numParams)
Creates a new function with given name and parameter count.
|
| Modifier and Type | Method and Description |
|---|---|
abstract BigDecimal |
eval(List<BigDecimal> parameters)
Implementation for this function.
|
String |
getName() |
int |
getNumParams() |
boolean |
numParamsVaries() |
public Expression.Function(String name, int numParams)
name - The name of the function.numParams - The number of parameters for this function.
-1 denotes a variable number of parameters.public String getName()
public int getNumParams()
public boolean numParamsVaries()
public abstract BigDecimal eval(List<BigDecimal> parameters)
parameters - Parameters will be passed by the expression evaluator as a
List of BigDecimal values.BigDecimal value as a
computing result.Copyright © 2015 Udo Klimaschewski. All rights reserved.