Top Description Methods
org.apache.commons.lang3.concurrent

public Interface Computable<I, O>

Known Direct Implementers
org.apache.commons.lang3.concurrent.Memoizer
Annotations
@FunctionalInterface
Type Parameters
<I>
the type of the input to the calculation
<O>
the type of the output of the calculation
Imports
org.apache.commons.lang3.function.FailableFunction

Definition of an interface for a wrapper around a calculation that takes a single parameter and returns a result.

This interface allows for wrapping a calculation into a class so that it maybe passed around an application.

See also FailableFunction<I, O, InterruptedException>.

Since
3.6
See Also
FailableFunction

Method Summary

Modifier and TypeMethod and Description
public O

Returns:

the result of the calculation
compute
(I
the argument for the calculation
arg
)

This method carries out the given operation with the provided argument.

Method Detail

computeback to summary
public O compute(I arg) throws InterruptedException

This method carries out the given operation with the provided argument.

Parameters
arg:I

the argument for the calculation

Returns:O

the result of the calculation

Exceptions
InterruptedException:
thrown if the calculation is interrupted