public abstract class Function extends LazyFunction
Modifier and Type | Field and Description |
---|---|
protected java.lang.Exception |
funcError |
protected java.lang.String |
funcKey |
protected boolean |
hasCachedValue |
Constructor and Description |
---|
Function(Expression exp,
java.lang.String name,
int numParams)
Creates a new function with given name and parameter count.
|
Modifier and Type | Method and Description |
---|---|
void |
cacheFuncValue(java.lang.String key,
java.lang.Double value) |
protected void |
errorLog(java.lang.String msg,
MboRemote mbo) |
java.math.BigDecimal |
eval(java.util.List parameters)
Implementation for this function.
|
protected java.lang.String |
funcKey(java.util.List parameters) |
java.lang.Double |
getCachedFuncValue(java.lang.String key) |
java.lang.Exception |
getFuncError() |
java.lang.String |
getStringValForHashCode(java.math.BigDecimal hashCode) |
boolean |
hasCachedFuncValue(java.lang.String key) |
LazyNumber |
lazyEval(java.util.List lazyParams)
Implementation for this function.
|
protected java.lang.String |
mboKeyDebugId(MboRemote mbo) |
void |
setFuncError(java.lang.Exception e) |
void |
validateSignature(java.lang.Integer expectedArgs,
java.util.List actArgs) |
protected void |
wrapMXException(MXException me) |
getExpression, getName, getNumParams, numParamsVaries
protected boolean hasCachedValue
protected java.lang.String funcKey
protected java.lang.Exception funcError
public Function(Expression exp, java.lang.String name, int numParams)
name
- The name of the function.numParams
- The number of parameters for this function.public void validateSignature(java.lang.Integer expectedArgs, java.util.List actArgs)
public LazyNumber lazyEval(java.util.List lazyParams)
LazyFunction
lazyEval
in class LazyFunction
BigDecimal
value as a
computing result.protected void wrapMXException(MXException me)
public java.lang.Double getCachedFuncValue(java.lang.String key)
public void cacheFuncValue(java.lang.String key, java.lang.Double value)
public boolean hasCachedFuncValue(java.lang.String key)
protected void errorLog(java.lang.String msg, MboRemote mbo)
protected java.lang.String mboKeyDebugId(MboRemote mbo)
public java.lang.String getStringValForHashCode(java.math.BigDecimal hashCode)
protected java.lang.String funcKey(java.util.List parameters)
public java.math.BigDecimal eval(java.util.List parameters)
parameters
- Parameters will be passed by the expression evaluator as a
List
of BigDecimal
values.BigDecimal
value as a
computing result.java.lang.Exception
public java.lang.Exception getFuncError()
public void setFuncError(java.lang.Exception e)