public abstract static class ValueFunctions.NumericFunction extends ValueFunctions.NamedValueFunction
| Modifier and Type | Field and Description |
|---|---|
protected int |
nargs |
protected String |
resultTypeName |
name, signature| Modifier | Constructor and Description |
|---|---|
protected |
NumericFunction(String name,
int nargs) |
protected |
NumericFunction(String name,
int nargs,
String resultTypeName) |
| Modifier and Type | Method and Description |
|---|---|
Value |
apply(Env env,
List<Value> in)
Applies the function to the list values using the environment as context
and returns the evaluated value.
|
boolean |
checkArgs(List<Value> in)
Checks if the arguments are valid.
|
abstract Number |
compute(Number... ns) |
String |
getParamDesc() |
getDescription, getParamDesc, getTypeName, toStringprotected String resultTypeName
protected int nargs
protected NumericFunction(String name, int nargs)
public String getParamDesc()
getParamDesc in class ValueFunctions.NamedValueFunctionpublic boolean checkArgs(List<Value> in)
ValueFunctionin - The input argumentspublic Value apply(Env env, List<Value> in)
ValueFunctionenv - The environment to usein - The input arguments