FailableSupplier
- @FunctionalInterface public interface org.apache.commons.lang3.function.FailableSupplier<T, E extends Throwable>[source]
A functional interface like
Supplierthat declares aThrowable.- Type 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. |
- 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. |
- T get() throws E[source]
Supplies an object
- Returns:
A result
- Throws:
E – Thrown if the supplier fails.
- 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