Package org.wildfly.clustering.function
Interface Callable<T>
- Type Parameters:
T- the result type
- All Superinterfaces:
Callable<T>
An enhanced callable.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptiondefault <R> Callable<R> Returns a callable whose result is mapped by the specified function.Returns a callable that runs the specified runner and returnsnull.static <T> Callable<T> Returns a callable that delegates to the specified supplier.static <T> Callable<T> of(T value) Returns a callable that returns the specified value.
-
Method Details
-
map
Returns a callable whose result is mapped by the specified function.- Type Parameters:
R- the mapped result type- Parameters:
mapper- a mapping function- Returns:
- a callable whose result is mapped by the specified function.
-
of
Returns a callable that runs the specified runner and returnsnull.- Parameters:
runner- a runner- Returns:
- a callable that runs the specified runner and returns
null.
-
of
Returns a callable that delegates to the specified supplier.- Parameters:
supplier- a supplier- Returns:
- the result of the specified supplier.
-
of
Returns a callable that returns the specified value.- Parameters:
value- the result value- Returns:
- a callable that returns the specified value.
-