| Modifier and Type | Field and Description |
|---|---|
protected Function<R> |
wrappedFunction |
| Constructor and Description |
|---|
WrappedFunction(Function<R> function)
Constructor for Basic Function
|
| Modifier and Type | Method and Description |
|---|---|
Parameters |
createParameters()
Creates an empty 'Parameters' object for you, which you have to fill and feed back to getFunctionValue
|
boolean |
equals(Object obj) |
String |
getDescription() |
R |
getFunctionValue(Object... parameters) |
R |
getFunctionValue(Parameters parameters)
Executes the defined function supplying the given arguments.
|
R |
getFunctionValueWithList(List<?> parameters)
Executes the defined function supplying the given List of arguments.
|
String |
getName()
A function must have a name.
|
Parameter<?>[] |
getParameterDefinition() |
ReturnType<R> |
getReturnType() |
int |
hashCode() |
void |
setDescription(String description)
For documentational purposes a function object needs a description too.
|
void |
setParameterDefinition(Parameter<?>[] params)
A function object is of no use, as long as it lacks a definition.
|
void |
setReturnType(ReturnType<R> type)
Sets the return type of the function's result value.
|
String |
toString() |
public Parameters createParameters()
FunctioncreateParameters in interface Function<R>Function.getFunctionValue(Parameters)public R getFunctionValue(Parameters parameters)
FunctiongetFunctionValue in interface Function<R>parameters - The parameters for the function. To specify an empty parameter list use Parameters.VOID.
Implementors are encouraged to support null too.Function.getReturnType()Function.createParameters()public R getFunctionValueWithList(List<?> parameters)
FunctionFunction.getFunctionValue(Parameters).getFunctionValueWithList in interface Function<R>parameters - The parameters for the function. To specify an empty parameter list use Parameters.VOID.Function.getReturnType()public void setDescription(String description)
FunctionsetDescription in interface Function<R>public String getDescription()
getDescription in interface Function<R>Function.setDescription(String)public String getName()
Functionpublic Parameter<?>[] getParameterDefinition()
getParameterDefinition in interface Function<R>null if not set already.public void setParameterDefinition(Parameter<?>[] params)
FunctionsetParameterDefinition in interface Function<R>params - An array of Parameter objects.public ReturnType<R> getReturnType()
getReturnType in interface Function<R>null if unknown.public void setReturnType(ReturnType<R> type)
FunctionsetReturnType in interface Function<R>type - A ReturnType object. For void functions that could be ReturnType.VOID.MMBase 1.9-SNAPSHOT - ${javadoctimestamp}