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

java.util.Locale method to stream available Locales

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • None
    • core-libs
    • None

      java.util.Local.getAvailableLocales returns an array of Locales.

      A method that returns java.util.stream.Stream<Locale> would be very useful to be able to filter and select Locales.

      It could retain the Locales avoiding the necessity of a defensive copy of the Locale[].

      Or alternatively, return an un-modifiable Set and allow the caller to stream() it.

            jlu Justin Lu
            rriggs Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: