@FunctionalInterface public interface ThrowingFunction<T,R,E extends Exception>
Function<T, R>
that can throw an exception.Modifier and Type | Method and Description |
---|---|
R |
apply(T t) |
default java.util.function.Function<T,R> |
asFunction()
Returns a Function that will wrap any thrown exception in a RuntimeException.
|
static <T2,R2,E2 extends Exception> |
asFunction(ThrowingFunction<T2,R2,E2> throwingFunction)
A simple helper for constructing a Function from a throwing lambda.
|
default java.util.function.Function<T,R> asFunction()
static <T2,R2,E2 extends Exception> java.util.function.Function<T2,R2> asFunction(ThrowingFunction<T2,R2,E2> throwingFunction)