Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8193279

(opt) add methods to convert to and from primitive Optional classes

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:

      Description

      It's fairly difficult to convert between Optional<Integer> and OptionalInt and vice-versa. This also applies to the Long and Double specializations. The workaround is to use streams, but this is quite roundabout.

        Attachments

          Activity

            People

            • Assignee:
              smarks Stuart Marks
              Reporter:
              smarks Stuart Marks
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: