Package org.nuxeo.common.function
Interface ThrowableFunction<T,R,E extends Throwable>
-
- Type Parameters:
T
- the type of the input to the functionR
- the type of the result of the functionE
- the type of exception to throw
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ThrowableFunction<T,R,E extends Throwable>
- Since:
- 11.1
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description R
apply(T t)
static <T,R,E extends Throwable>
Function<T,R>asFunction(ThrowableFunction<T,R,E> throwableFunction)
default Function<T,R>
toFunction()
-
-
-
Method Detail
-
toFunction
default Function<T,R> toFunction()
- Returns:
- this
ThrowableFunction
as aFunction
throwing the checked exception as an unchecked one
-
asFunction
static <T,R,E extends Throwable> Function<T,R> asFunction(ThrowableFunction<T,R,E> throwableFunction)
- Returns:
- the given
ThrowableFunction
as aFunction
throwing the checked exception as an unchecked one
-
-