On this page

Suppliers

public class org.apache.commons.lang3.function.Suppliers[source]

Helps use Supplier.

Since:

3.13.0

Constructors

Suppliers()

Deprecated. Make private in 4.0.

@Deprecated public Suppliers()[source]

Deprecated: TODO Make private in 4.0.

Make private in 4.0.

Methods

get(Supplier)

Gets the result of Supplier#get(), or null if the supplier is null.

nul()

Gets the singleton supplier that always returns null.

public static <T> T get(Supplier<T> supplier)[source]

Gets the result of Supplier#get(), or null if the supplier is null.

Type parameters:

<T> – The type of results supplied by this supplier.

Parameters:

supplier – The supplier or null.

Returns:

Result of Supplier#get() or null.

@SuppressWarnings({"unchecked"}) public static <T> Supplier<T> nul()[source]

Gets the singleton supplier that always returns null.

This supplier never throws an exception.

Type parameters:

<T> – Supplied type.

Returns:

The NUL singleton.

Since:

3.14.0