Package aQute.bnd.exceptions
Interface FunctionWithException<T,R>
- Type Parameters:
T
- the type of the argumentR
- the result type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Function interface that allows exceptions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,
R> Function<T, R> asFunction
(FunctionWithException<T, R> unchecked) static <T,
R> Function<T, R> asFunctionOrElse
(FunctionWithException<T, R> unchecked, R orElse) static <T,
R> Function<T, R> asFunctionOrElseGet
(FunctionWithException<T, R> unchecked, Supplier<? extends R> orElseGet)
-
Method Details
-
apply
- Throws:
Exception
-
orElseThrow
-
orElse
-
orElseGet
-
asFunction
-
asFunctionOrElse
-
asFunctionOrElseGet
static <T,R> Function<T,R> asFunctionOrElseGet(FunctionWithException<T, R> unchecked, Supplier<? extends R> orElseGet)
-