java.lang.Object
com.aoapps.lang.function.Functions
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,R> Optional <R> Lazily evaluates a set of functions, returning the first non-null result orOptional.empty()when no result.Lazily evaluates a set of functions, returning the first non-null result orOptional.empty()when no result.
-
Method Details
-
coalesce
Lazily evaluates a set of functions, 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,R, Optional<R> coalesceEEx extends Throwable> (T t, FunctionE<? super T, ? extends R, throws Ex? extends Ex>... functions) Lazily evaluates a set of functions, 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
-
