I have an instance of OptionalLong
. But one of my libraries requires an Optional<Long>
as a parameter.
How can I convert my OptionalLong
into an Optional<Long>
?
I was dreaming about something like this:
OptionalLong secondScreenHeight = OptionalLong.of(32l); // or: OptionalLong.empty()
api.setHeight(secondScreenHeight.mapToRegularOptional()); // .mapToUsualOptional does not exist