FailableSupplier¶
- @FunctionalInterface public abstract interface org.apache.commons.lang3.function.FailableSupplier<T, E extends Throwable>[source]¶
A functional interface like
Supplierthat declares aThrowable.- Parameters:
<T> – The type of results supplied by this supplier.
<E> – The kind of thrown exception or error.
- Since:
3.11
Fields and constants¶
Returns the singleton supplier that always returns null. |
- @SuppressWarnings({"rawtypes"}) public static final FailableSupplier NUL[source]¶
Returns the singleton supplier that always returns null.
This supplier never throws an exception.
- Since:
3.14.0
Methods¶
Supplies an object |
|
Gets the singleton supplier that always returns null. |
- public abstract T get() throws E[source]¶
Supplies an object
- Returns:
A result
- Throws:
E – Thrown if the supplier fails.
- @SuppressWarnings({"unchecked"}) public static <T, E extends Exception> FailableSupplier<T, E> nul()[source]¶
Gets the singleton supplier that always returns null.
This supplier never throws an exception.
- Type parameters:
<T> – Supplied type.
<E> – The kind of thrown exception or error.
- Returns:
The NUL singleton.
- Since:
3.14.0