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.
@FunctionalInterface public interface FunctionWithException<T,R>
Function interface that allows exceptions.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description R
apply(T t)
static <T,R>
java.util.function.Function<T,R>asFunction(FunctionWithException<T,R> unchecked)
static <T,R>
java.util.function.Function<T,R>asFunctionOrElse(FunctionWithException<T,R> unchecked, R orElse)
static <T,R>
java.util.function.Function<T,R>asFunctionOrElseGet(FunctionWithException<T,R> unchecked, java.util.function.Supplier<? extends R> orElseGet)
default java.util.function.Function<T,R>
orElse(R orElse)
default java.util.function.Function<T,R>
orElseGet(java.util.function.Supplier<? extends R> orElseGet)
default java.util.function.Function<T,R>
orElseThrow()
-
-
-
Method Detail
-
orElseGet
default java.util.function.Function<T,R> orElseGet(java.util.function.Supplier<? extends R> orElseGet)
-
asFunction
static <T,R> java.util.function.Function<T,R> asFunction(FunctionWithException<T,R> unchecked)
-
asFunctionOrElse
static <T,R> java.util.function.Function<T,R> asFunctionOrElse(FunctionWithException<T,R> unchecked, R orElse)
-
asFunctionOrElseGet
static <T,R> java.util.function.Function<T,R> asFunctionOrElseGet(FunctionWithException<T,R> unchecked, java.util.function.Supplier<? extends R> orElseGet)
-
-