Interface ThrowableSupplier<T,E extends Throwable>
-
- Type Parameters:
T- The type this supplier is supposed to return.E- The type of exception thisSupplieris expected to throw.
- All Superinterfaces:
Supplier<T>
- 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 ThrowableSupplier<T,E extends Throwable> extends Supplier<T>
Simple hack to add checked error support to aSuppliers. It is mainly used in conjunction withUtilities.supplierHandling(ThrowableSupplier, Consumer)to achieve error handling within aSupplier.- Author:
- Collin Alpert
- See Also:
Supplier