T - the type of the output to the functionE - the type of the thrown checked exception@FunctionalInterface public interface ThrowingSupplier<T,E extends Exception>
| Modifier and Type | Method and Description |
|---|---|
default ThrowingFunction<Void,T,E> |
asFunction() |
T |
get() |
default Supplier<Optional<T>> |
lift() |
static <T> Supplier<Optional<T>> |
lifted(ThrowingSupplier<T,?> supplier) |
static <T1> Supplier<T1> |
sneaky(ThrowingSupplier<T1,?> supplier)
Returns a new Supplier instance which rethrows the checked exception using the Sneaky Throws pattern
|
default Supplier<T> |
uncheck() |
static <T> Supplier<T> |
unchecked(ThrowingSupplier<T,?> supplier) |
default ThrowingFunction<Void,T,E> asFunction()
static <T> Supplier<T> unchecked(ThrowingSupplier<T,?> supplier)
static <T> Supplier<Optional<T>> lifted(ThrowingSupplier<T,?> supplier)
static <T1> Supplier<T1> sneaky(ThrowingSupplier<T1,?> supplier)
default Supplier<T> uncheck()
Copyright © 2020. All rights reserved.