Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8025909 Lambda Library Spec Updates
  3. JDK-8020061

Clarify reporting characteristics between splits

XMLWordPrintable

    • b113

      The JavaDoc on Spliterator.characteristics states:

          /**
           * Returns a set of characteristics of this Spliterator and its
           * elements. The result is represented as ORed values from {@link
           * #ORDERED}, {@link #DISTINCT}, {@link #SORTED}, {@link #SIZED},
           * {@link #NONNULL}, {@link #IMMUTABLE}, {@link #CONCURRENT},
           * {@link #SUBSIZED}. Repeated calls to {@code characteristics()} on
           * a given spliterator should always return the same result.


      The last sentence needs adjusting to clarify that repeated calls should always return the same result before and in-between splitting.

      For example the Spliterator for concatation will before splitting report combined characteristics of both spliterators and after splitting report that of the latter spliterator. Or, the top level spliterator for a HashMap will reported SIZED, but after splitting will not.

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

              Created:
              Updated:
              Resolved: