8048689: Clarify documentation on BaseStream.spliterator
authorpsandoz
Mon, 02 Feb 2015 14:18:54 +0100
changeset 28752 9c115a7527c9
parent 28751 47403deaec44
child 28753 764648da0e46
8048689: Clarify documentation on BaseStream.spliterator Reviewed-by: lancea, chegar
jdk/src/java.base/share/classes/java/util/stream/BaseStream.java
--- a/jdk/src/java.base/share/classes/java/util/stream/BaseStream.java	Fri Jan 30 16:13:57 2015 -0500
+++ b/jdk/src/java.base/share/classes/java/util/stream/BaseStream.java	Mon Feb 02 14:18:54 2015 +0100
@@ -79,6 +79,14 @@
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
+     * <p>
+     * The returned spliterator should report the set of characteristics derived
+     * from the stream pipeline (namely the characteristics derived from the
+     * stream source spliterator and the intermediate operations).
+     * Implementations may report a sub-set of those characteristics.  For
+     * example, it may be too expensive to compute the entire set for some or
+     * all possible stream pipelines.
+     *
      * @return the element spliterator for this stream
      */
     Spliterator<T> spliterator();