Interface FunctionExecutor<V>
-
- Type Parameters:
V- the type of the function argument
public interface FunctionExecutor<V>Encapsulates execution of a function.- Author:
- Paul Ferraro
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <R,E extends Exception>
Rexecute(org.wildfly.common.function.ExceptionFunction<V,R,E> function)Executes the given function.static <V> FunctionExecutor<V>of(Supplier<V> reference)
-
-
-
Method Detail
-
of
static <V> FunctionExecutor<V> of(Supplier<V> reference)
-
execute
<R,E extends Exception> R execute(org.wildfly.common.function.ExceptionFunction<V,R,E> function) throws E extends Exception
Executes the given function.- Type Parameters:
R- the return typeE- the exception type- Parameters:
function- a function to execute- Returns:
- the result of the function
- Throws:
E- if the function fails to executeE extends Exception
-
-