Interface ThrowableSupplier<T,E extends java.lang.Throwable>
-
- Type Parameters:
T- The type this supplier is supposed to return.E- The type of exception thisSupplieris expected to throw.
- All Superinterfaces:
java.util.function.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 java.lang.Throwable> extends java.util.function.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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description Tfetch()default Tget()Deprecated.Do not use this method in a specific implementation.
-
-
-
Method Detail
-
get
@Deprecated(since="4.0") default T get()
Deprecated.Do not use this method in a specific implementation. Please use thefetch()method instead.This method only exists so this interface can be used as a functional interface.- Specified by:
getin interfacejava.util.function.Supplier<T>- Returns:
- This method will always return
null.
-
-