Package com.chutneytesting.tools
Interface ThrowingSupplier<T,E extends Exception>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptionget()silence(ThrowingSupplier<T, E> throwingFunction, Function<Exception, T> exceptionHandler) toUnchecked(ThrowingSupplier<T, E> throwingFunction) default T
-
Method Details
-
get
-
unsafeGet
-
toUnchecked
static <T,E extends Exception> Supplier<T> toUnchecked(ThrowingSupplier<T, E> throwingFunction) throws UncheckedException- Throws:
UncheckedException- if givenThrowingFunctionthrows
-
silence
static <T,E extends Exception> Supplier<T> silence(ThrowingSupplier<T, E> throwingFunction, Function<Exception, T> exceptionHandler)
-