@FunctionalInterface public interface ThrowingSupplier<T,E extends Exception>
Supplier<T>
can throw an exception.Modifier and Type | Method and Description |
---|---|
default java.util.function.Supplier<T> |
asSupplier()
Returns a Supplier that will wrap any thrown exception in a RuntimeException.
|
static <T,E extends Exception> |
fromSupplier(java.util.function.Supplier<T> supplier)
Returns a
ThrowingSupplier from a Supplier |
T |
get() |
default java.util.function.Supplier<T> asSupplier()
static <T,E extends Exception> ThrowingSupplier<T,E> fromSupplier(java.util.function.Supplier<T> supplier)
ThrowingSupplier
from a Supplier