java.lang.Object
com.aoapps.lang.function.Suppliers
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Optional<T> Lazily evaluates a set of suppliers, returning the first non-null result orOptional.empty()when no result.Lazily evaluates a set of suppliers, returning the first non-null result orOptional.empty()when no result.
-
Method Details
-
coalesce
Lazily evaluates a set of suppliers, returning the first non-null result orOptional.empty()when no result.- Returns:
- The first non-null result or
Optional.empty()when all returnnull
-
coalesceE
public static <T,Ex extends Throwable> Optional<T> coalesceE(SupplierE<? extends T, ? extends Ex>... suppliers) throws ExLazily evaluates a set of suppliers, returning the first non-null result orOptional.empty()when no result.- Returns:
- The first non-null result or
Optional.empty()when all returnnull - Throws:
Ex
-
