Class Suppliers
java.lang.Object
org.apache.commons.lang3.function.Suppliers
Helps use
Supplier.- Since:
- 3.13.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TGets the result ofSupplier.get(), or null if the supplier is null.static <T> Supplier<T> nul()Gets the singleton supplier that always returns null.
-
Constructor Details
-
Suppliers
Deprecated.TODO Make private in 4.0.Make private in 4.0.
-
-
Method Details
-
get
Gets the result ofSupplier.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.
-
nul
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
-