T - The return type@FunctionalInterface
public interface ThrowingSupplier<T>
| Modifier and Type | Method and Description |
|---|---|
T |
get()
Get the value from the supplier.
|
default java.util.function.Supplier<T> |
toSupplier()
Convert this ThrowingSupplier to a standard Supplier.
|
static <T> java.util.function.Supplier<T> |
toSupplier(ThrowingSupplier<T> supplier)
Convert a ThrowingSupplier to a standard Supplier.
|
default T |
tryGet()
Get the value from the supplier and sneakily throw any exceptions.
|
static <T> T |
tryGet(ThrowingSupplier<T> supplier)
Get the value from the supplier and sneakily throw any exceptions.
|
static <T> T tryGet(ThrowingSupplier<T> supplier)
T - The return typesupplier - The ThrowingSupplierstatic <T> java.util.function.Supplier<T> toSupplier(ThrowingSupplier<T> supplier)
T - The return typesupplier - The ThrowingSupplierT get() throws java.lang.Throwable
java.lang.Throwable - If an error occursdefault T tryGet()
default java.util.function.Supplier<T> toSupplier()