Top Description Fields Methods
org.apache.commons.lang3.function

public Interface FailableSupplier<T, E extends Throwable>

Known Direct Subinterfaces
org.apache.commons.lang3.concurrent.ConcurrentInitializer
Known Direct Implementers
org.apache.commons.lang3.builder.AbstractSupplier
Annotations
@FunctionalInterface
Type Parameters
<T>
The type of results supplied by this supplier.
<E>
The kind of thrown exception or error.
Imports
java.util.function.Supplier

A functional interface like Supplier that declares a Throwable.
Since
3.11

Field Summary

Modifier and TypeField and Description
public static final FailableSupplier<T, E extends Throwable>
NUL

Returns the singleton supplier that always returns null.

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

a result
get
()

Supplies an object

public static <
Supplied type.
T
,
The kind of thrown exception or error.
E extends Exception
>
FailableSupplier<T, E>

Returns:

The NUL singleton.
nul
()

Gets the singleton supplier that always returns null.

Field Detail

NULback to summary
public static final FailableSupplier<T, E extends Throwable> NUL

Returns the singleton supplier that always returns null.

This supplier never throws an exception.

Annotations
@SuppressWarnings:rawtypes
Since
3.14.0

Method Detail

getback to summary
public T get() throws E

Supplies an object

Returns:T

a result

Exceptions
E:
if the supplier fails
nulback to summary
public static <T, E extends Exception> FailableSupplier<T, E> nul()

Gets the singleton supplier that always returns null.

This supplier never throws an exception.

Parameters
<T>
Supplied type.
<E>
The kind of thrown exception or error.
Returns:FailableSupplier<T, E>

The NUL singleton.

Annotations
@SuppressWarnings:unchecked
Since
3.14.0