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