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

add Optional.peek intermediate operation (similar to Stream.peek)

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      Stream.peek returns a stream consisting of the elements of the original stream, additionally performing a provided action on each element as elements are consumed from the resulting stream. It would be very useful (for debugging, logging, etc.) to provide the same functionality for Optional, where peek() would take a Consumer and would return the Optional's original contents.


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

              Created:
              Updated: