R
- the type of result produced by the function.public abstract class Function<R> extends Operation
Function
is an Operation
which produces a result, that the caller can access once the function is executed.
Clients may extend this class.
Constructor and Description |
---|
Function(String name)
Creates an new instance of
Function . |
Modifier and Type | Method and Description |
---|---|
R |
getResult()
Returns the result produced by the function execution.
|
protected void |
setResult(R result)
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()
null
if the function is not yet executed or if no result
was set during its execution.null
if none.protected final void setResult(R result)
run(IProgressMonitor)
execution.result
- the result produced by the function execution.