|
MOEA Framework 2.12 API Specification |
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.moeaframework.util.tree.Node
org.moeaframework.util.tree.Call
public class Call
The node for calling a named function.
Define
Constructor Summary | |
---|---|
Call(Define function)
Constructs a new node for calling the function as defined. |
|
Call(String functionName,
Class<?> returnType)
Constructs a new node for calling a function that takes no arguments. |
|
Call(String functionName,
Class<?> returnType,
String[] variableNames,
Class<?>[] variableTypes)
Constructs a new node for calling a function that takes a user-defined number of arguments. |
|
Call(String functionName,
Class<?> returnType,
String variableName,
Class<?> variableType)
Constructs a new node for calling a function that takes one argument. |
|
Call(String functionName,
Class<?> returnType,
String name1,
Class<?> type1,
String name2,
Class<?> type2)
Constructs a new node for calling a function that takes two arguments. |
Method Summary | |
---|---|
Node |
copyNode()
Returns a copy of this node, but without any children or parents assigned. |
Object |
evaluate(Environment environment)
Evaluates this node in the context of the specified environment. |
String |
getFunctionName()
Returns the name of this function. |
String[] |
getVariableNames()
Returns the names of the arguments to this function. |
Class<?>[] |
getVariableTypes()
Returns the types of the arguments to this function. |
String |
toString()
|
Methods inherited from class org.moeaframework.util.tree.Node |
---|
copyTree, getArgument, getArgumentType, getDepth, getFunctionAt, getFunctionAt, getMaximumHeight, getMinimumHeight, getNodeAt, getNodeAt, getNodeAt, getNumberOfArguments, getNumberOfFunctions, getNumberOfFunctions, getNumberOfNodes, getNumberOfNodes, getNumberOfNodes, getNumberOfTerminals, getNumberOfTerminals, getParent, getReturnType, getTerminalAt, getTerminalAt, isFixed, isTerminal, isValid, setArgument, setFixed, setFixedTree, size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Call(String functionName, Class<?> returnType)
functionName
- the name of the functionreturnType
- the return type of the functionpublic Call(String functionName, Class<?> returnType, String variableName, Class<?> variableType)
functionName
- the name of the functionreturnType
- the return type of the functionvariableName
- the name of the argumentvariableType
- the type of the argumentpublic Call(String functionName, Class<?> returnType, String name1, Class<?> type1, String name2, Class<?> type2)
functionName
- the name of the functionreturnType
- the return type of the functionname1
- the name of the first argumenttype1
- the type of the first argumentname2
- the name of the second argumenttype2
- the type of the second argumentpublic Call(Define function)
function
- the functionpublic Call(String functionName, Class<?> returnType, String[] variableNames, Class<?>[] variableTypes)
functionName
- the name of the functionreturnType
- the return type of the functionvariableNames
- the names of the arguments to the functionvariableTypes
- the types of the arguments to the functionMethod Detail |
---|
public String getFunctionName()
public String[] getVariableNames()
public Class<?>[] getVariableTypes()
public Node copyNode()
Node
copyNode
in class Node
public Object evaluate(Environment environment)
Node
evaluate
in class Node
environment
- the execution environment
public String toString()
toString
in class Node
|
MOEA Framework 2.12 API Specification |
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |