R- the type of result produced by the function.
public abstract class Function<R> extends Operation
Operationwhich produces a result, that the caller can access once the function is executed.
Clients may extend this class.
|Constructor and Description|
Creates an new instance of
|Modifier and Type||Method and Description|
Returns the result produced by the function execution.
Sets the result produced by the function execution.
getName, getStatus, isCanceledOrFailed, run, run, run
public Function(String name)
Function. The name of the function is used as a message of the corresponding function status.
name- the function name.
public final R getResult()
nullif the function is not yet executed or if no result was set during its execution.
protected final void setResult(R result)
result- the result produced by the function execution.