Class Optionals
java.lang.Object
io.github.torand.javacommons.functional.Optionals
General purpose utilities for optionals.
-
Method Summary
-
Method Details
-
mapSafely
Executes the specified mapping function on the value if it is not null. Returns null if it is.- Type Parameters:
T
- the type to map from.U
- the type to map to.- Parameters:
value
- the value to map.mapper
- the mapper function.- Returns:
- the mapped value if not null.
-