public abstract class AbstractLazyFunction extends java.lang.Object implements LazyFunction
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
booleanFunction
Whether this function is a boolean function.
|
protected java.lang.String |
name
Name of this function.
|
protected int |
numParams
Number of parameters expected for this function.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractLazyFunction(java.lang.String name,
int numParams)
Creates a new function with given name and parameter count.
|
protected |
AbstractLazyFunction(java.lang.String name,
int numParams,
boolean booleanFunction)
Creates a new function with given name and parameter count.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getName()
Gets the name of this function.
The name is use to invoke this function in the expression. |
int |
getNumParams()
Gets the number of parameters this function accepts.
A value of -1 denotes that this function accepts a variable
number of parameters. |
boolean |
isBooleanFunction()
Gets whether this function evaluates to a boolean expression.
|
boolean |
numParamsVaries()
Gets whether the number of accepted parameters varies.
That means that the function does accept an undefined amount of parameters. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlazyEvalprotected java.lang.String name
protected int numParams
-1
denotes a variable number of parameters.protected boolean booleanFunction
protected AbstractLazyFunction(java.lang.String name,
int numParams,
boolean booleanFunction)
name - The name of the function.numParams - The number of parameters for this function.
-1 denotes a variable number of parameters.booleanFunction - Whether this function is a boolean function.protected AbstractLazyFunction(java.lang.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 java.lang.String getName()
LazyFunctiongetName in interface LazyFunctionpublic int getNumParams()
LazyFunction-1 denotes that this function accepts a variable
number of parameters.getNumParams in interface LazyFunctionpublic boolean numParamsVaries()
LazyFunctionnumParamsVaries in interface LazyFunctiontrue if the number of accepted parameters varies.public boolean isBooleanFunction()
LazyFunctionisBooleanFunction in interface LazyFunctiontrue if this function evaluates to a boolean
expression.