I have an Optional that I want to \"convert\" to an OptionalInt, but there doesn\'t seem to be a simple way to do this.
Optional
OptionalInt
Here\'s what I want
This is how I convert an Optional to OptionalInt
OptionalInt lastSeenId = Optional.of("123").map(Integer::parseInt).map(OptionalInt::of).orElseGet(OptionalInt::empty);