T - the type of items supplied by this supplier@FunctionalInterface public interface UncheckedSupplier<T>
The supplier can throw Exceptions.
| Modifier and Type | Method and Description |
|---|---|
static <T> UncheckedSupplier<T> |
from(Supplier<T> supplier)
Creates a new
UncheckedSupplier from an existing Supplier |
T |
get()
Gets an item.
|
default Supplier<T> |
toSupplier() |
static <T> UncheckedSupplier<T> from(Supplier<T> supplier)
UncheckedSupplier from an existing SupplierT - the type of items supplied by this suppliersupplier - the supplierUncheckedSupplierT get() throws Exception
Exception - if anything wrong happendefault Supplier<T> toSupplier()
Supplier getting the item produced by this UncheckedSupplier. If an exception is
thrown during the production, this exception is rethrown, wrapped into a RuntimeException if needed.Copyright © 2019–2020 SmallRye. All rights reserved.