You must pass in something that implements java.util.function.Function
. You have two main choices:
- make
Try
extendFunction
- convert
Try
to aFunction
, e.g.map(try1::apply)
You cannot get around the need to pass in a Function
to map
.
CLICK HERE to find out more related problems solutions.