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

Add notes to BaseStream.spliterator/iterator docs regarding them being escape hatches

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 21
    • 9
    • core-libs

    Description

      The stream package doc states:

       * stream. In almost all cases, terminal operations are <em>eager</em>,
       * completing their traversal of the data source and processing of the pipeline
       * before returning. Only the terminal operations {@code iterator()} and
       * {@code spliterator()} are not; these are provided as an "escape hatch" to enable
       * arbitrary client-controlled pipeline traversals in the event that the
       * existing operations are not sufficient to the task.

      Similar notes should be added to BaseStream.spliterator/iterator.

      Attachments

        Issue Links

          Activity

            People

              vklang Viktor Klang
              psandoz Paul Sandoz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: