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

Add Stream dropWhile and takeWhile operations

XMLWordPrintable

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

        Add two new operations to Stream and primitive specializations:

          1) Stream.takeWhile(Predicate<? super T> test)
              Returns a stream consisting of the longest prefix of elements of this stream
              that match the given predicate
          2) Stream.dropWhile(Predicate<? super T> test)
              Returns a stream consisting of the remaining elements of this stream
              after dropping the longest prefix of elements that match the given predicate.

              psandoz Paul Sandoz
              psandoz Paul Sandoz
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: