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.
@FunctionalInterface public interface ThrowingSupplier<T,E extends Exception>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Tget()static <T,E extends Exception>
Supplier<T>silence(ThrowingSupplier<T,E> throwingFunction, Function<Exception,T> exceptionHandler)static <T,E extends Exception>
Supplier<T>toUnchecked(ThrowingSupplier<T,E> throwingFunction)default TunsafeGet()
-
-
-
Method Detail
-
unsafeGet
default T 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)
-
-