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

Enchance ofNullable with a collection as input

    XMLWordPrintable

Details

    • Enhancement
    • Status: New
    • P4
    • Resolution: Unresolved
    • 8
    • None
    • core-libs

    Description

      A DESCRIPTION OF THE PROBLEM :
      ofNullable to have a collection as input. So a stream of elements are initialized instead of the collection.

      public static <T> Stream<T> ofNullable(Collection<T> collection) {
          return collection == null ? Stream.empty() : collection.stream();
        }


      Attachments

        Activity

          People

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: