public final class Function
extends java.lang.Object
| Constructor and Description |
|---|
Function(java.lang.Enum<?> id,
DataType returnType,
Node body,
Variable... parameters)
Creates a function with a variable number of parameters.
|
| Modifier and Type | Method and Description |
|---|---|
Node |
getBody()
Returns the body of the function (underlying expression).
|
java.lang.Enum<?> |
getId()
Returns the identifier of the operation associated with the function.
|
Variable |
getParameter(int index)
Returns function parameters by their index.
|
int |
getParameterCount()
Returns the parameter count.
|
DataType |
getReturnType()
Returns the function return type.
|
java.lang.String |
getUniqueName()
Returns a unique name for the function.
|
public Function(java.lang.Enum<?> id,
DataType returnType,
Node body,
Variable... parameters)
id - The identifier of the operator the function is associated with.returnType - The function return type.body - The body of the function (underlying expression).parameters - An variable-length list of parameters.java.lang.IllegalArgumentException - if any of the parameters is null.public java.lang.Enum<?> getId()
public java.lang.String getUniqueName()
public DataType getReturnType()
public Node getBody()
public int getParameterCount()
public Variable getParameter(int index)
index - The index of the needed parameter.java.lang.IndexOutOfBoundsException - if the parameter index is out of bounds of the parameter
array.