Class Functions
java.lang.Object
org.apache.commons.lang3.function.Functions
Factory for
Function
.- Since:
- 3.14.0
-
Method Details
-
apply
Applies theFunction
on the object if the function is notnull
. Otherwise, does nothing and returnsnull
.- Type Parameters:
T
- the type of the argument the function applies.R
- the type of the result the function returns.- Parameters:
function
- the function to apply.object
- the object to apply the function.- Returns:
- the value the function returns if the function is not
null
;null
otherwise. - Since:
- 3.15.0
-
function
Starts a fluent chain likefunction(foo::bar).andThen(...).andThen(...).apply(...);
- Type Parameters:
T
- Input type.R
- Return type.- Parameters:
function
- the argument to return.- Returns:
- the argument
-