Module com.machinezoo.noexception
Interface ThrowingSupplier<T>
-
- Type Parameters:
-
T- seeSupplier
- 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>
Variation ofSupplierthat allows throwing checked exceptions.ThrowingSupplieris usually implemented by a lambda and passed toCheckedExceptionHandler.supplier(ThrowingSupplier). See noexception tutorial.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tget()Variation ofSupplier.get()that allows throwing checked exceptions.
-
-
-
Method Detail
-
get
T get() throws Throwable
Variation ofSupplier.get()that allows throwing checked exceptions.- Returns:
-
see
Supplier.get() - Throws:
-
Throwable- if unable to complete - See Also:
-
CheckedExceptionHandler.supplier(ThrowingSupplier),Supplier.get()
-
-