I notice that in a lot of code I'm not interested in the Exception that is thrown in a called method. I just want to get an Optional if it succeeds, and an empty() if not.
Is there something similar to ofNullable, but then instead an ofThrowable, where I pass a function reference? Then I could do something like:
myOptionalString.flatMap(ofThrowable(Integer::parseInt))