提交 4943d6c2 编写于 作者: P psandoz

8014731: j.u.stream.StreamSupport class has default constructor generated

Summary: This change set also fixes broken links
Reviewed-by: alanb, chegar
Contributed-by: NPaul Sandoz &lt;paul.sandoz@oracle.com&gt;, Henry Jen <henry.jen@oracle.com>
上级 a6977ee8
...@@ -41,7 +41,11 @@ import java.util.function.Supplier; ...@@ -41,7 +41,11 @@ import java.util.function.Supplier;
* *
* @since 1.8 * @since 1.8
*/ */
public class StreamSupport { public final class StreamSupport {
// Suppresses default constructor, ensuring non-instantiability.
private StreamSupport() {}
/** /**
* Creates a new sequential {@code Stream} from a {@code Spliterator}. * Creates a new sequential {@code Stream} from a {@code Spliterator}.
* *
...@@ -50,7 +54,7 @@ public class StreamSupport { ...@@ -50,7 +54,7 @@ public class StreamSupport {
* *
* <p>It is strongly recommended the spliterator report a characteristic of * <p>It is strongly recommended the spliterator report a characteristic of
* {@code IMMUTABLE} or {@code CONCURRENT}, or be * {@code IMMUTABLE} or {@code CONCURRENT}, or be
* <a href="Spliterator.html#binding">late-binding</a>. Otherwise, * <a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
* {@link #stream(Supplier, int)} should be used to * {@link #stream(Supplier, int)} should be used to
* reduce the scope of potential interference with the source. See * reduce the scope of potential interference with the source. See
* <a href="package-summary.html#Non-Interference">Non-Interference</a> for * <a href="package-summary.html#Non-Interference">Non-Interference</a> for
...@@ -75,7 +79,7 @@ public class StreamSupport { ...@@ -75,7 +79,7 @@ public class StreamSupport {
* *
* <p>It is strongly recommended the spliterator report a characteristic of * <p>It is strongly recommended the spliterator report a characteristic of
* {@code IMMUTABLE} or {@code CONCURRENT}, or be * {@code IMMUTABLE} or {@code CONCURRENT}, or be
* <a href="Spliterator.html#binding">late-binding</a>. Otherwise, * <a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
* {@link #stream(Supplier, int)} should be used to * {@link #stream(Supplier, int)} should be used to
* reduce the scope of potential interference with the source. See * reduce the scope of potential interference with the source. See
* <a href="package-summary.html#Non-Interference">Non-Interference</a> for * <a href="package-summary.html#Non-Interference">Non-Interference</a> for
...@@ -102,7 +106,7 @@ public class StreamSupport { ...@@ -102,7 +106,7 @@ public class StreamSupport {
* *
* <p>For spliterators that report a characteristic of {@code IMMUTABLE} * <p>For spliterators that report a characteristic of {@code IMMUTABLE}
* or {@code CONCURRENT}, or that are * or {@code CONCURRENT}, or that are
* <a href="Spliterator.html#binding">late-binding</a>, it is likely * <a href="../Spliterator.html#binding">late-binding</a>, it is likely
* more efficient to use {@link #stream(java.util.Spliterator)} instead. * more efficient to use {@link #stream(java.util.Spliterator)} instead.
* The use of a {@code Supplier} in this form provides a level of * The use of a {@code Supplier} in this form provides a level of
* indirection that reduces the scope of potential interference with the * indirection that reduces the scope of potential interference with the
...@@ -138,7 +142,7 @@ public class StreamSupport { ...@@ -138,7 +142,7 @@ public class StreamSupport {
* *
* <p>For spliterators that report a characteristic of {@code IMMUTABLE} * <p>For spliterators that report a characteristic of {@code IMMUTABLE}
* or {@code CONCURRENT}, or that are * or {@code CONCURRENT}, or that are
* <a href="Spliterator.html#binding">late-binding</a>, it is likely * <a href="../Spliterator.html#binding">late-binding</a>, it is likely
* more efficient to use {@link #stream(Spliterator)} instead. * more efficient to use {@link #stream(Spliterator)} instead.
* The use of a {@code Supplier} in this form provides a level of * The use of a {@code Supplier} in this form provides a level of
* indirection that reduces the scope of potential interference with the * indirection that reduces the scope of potential interference with the
...@@ -172,7 +176,7 @@ public class StreamSupport { ...@@ -172,7 +176,7 @@ public class StreamSupport {
* *
* <p>It is strongly recommended the spliterator report a characteristic of * <p>It is strongly recommended the spliterator report a characteristic of
* {@code IMMUTABLE} or {@code CONCURRENT}, or be * {@code IMMUTABLE} or {@code CONCURRENT}, or be
* <a href="Spliterator.html#binding">late-binding</a>. Otherwise, * <a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
* {@link #stream(Supplier, int)}} should be used to * {@link #stream(Supplier, int)}} should be used to
* reduce the scope of potential interference with the source. See * reduce the scope of potential interference with the source. See
* <a href="package-summary.html#Non-Interference">Non-Interference</a> for * <a href="package-summary.html#Non-Interference">Non-Interference</a> for
...@@ -195,7 +199,7 @@ public class StreamSupport { ...@@ -195,7 +199,7 @@ public class StreamSupport {
* *
* <p>It is strongly recommended the spliterator report a characteristic of * <p>It is strongly recommended the spliterator report a characteristic of
* {@code IMMUTABLE} or {@code CONCURRENT}, or be * {@code IMMUTABLE} or {@code CONCURRENT}, or be
* <a href="Spliterator.html#binding">late-binding</a>. Otherwise, * <a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
* {@link #stream(Supplier, int)}} should be used to * {@link #stream(Supplier, int)}} should be used to
* reduce the scope of potential interference with the source. See * reduce the scope of potential interference with the source. See
* <a href="package-summary.html#Non-Interference">Non-Interference</a> for * <a href="package-summary.html#Non-Interference">Non-Interference</a> for
...@@ -220,7 +224,7 @@ public class StreamSupport { ...@@ -220,7 +224,7 @@ public class StreamSupport {
* *
* <p>For spliterators that report a characteristic of {@code IMMUTABLE} * <p>For spliterators that report a characteristic of {@code IMMUTABLE}
* or {@code CONCURRENT}, or that are * or {@code CONCURRENT}, or that are
* <a href="Spliterator.html#binding">late-binding</a>, it is likely * <a href="../Spliterator.html#binding">late-binding</a>, it is likely
* more efficient to use {@link #intStream(Spliterator.OfInt)} instead. * more efficient to use {@link #intStream(Spliterator.OfInt)} instead.
* The use of a {@code Supplier} in this form provides a level of * The use of a {@code Supplier} in this form provides a level of
* indirection that reduces the scope of potential interference with the * indirection that reduces the scope of potential interference with the
...@@ -254,7 +258,7 @@ public class StreamSupport { ...@@ -254,7 +258,7 @@ public class StreamSupport {
* *
* <p>For spliterators that report a characteristic of {@code IMMUTABLE} * <p>For spliterators that report a characteristic of {@code IMMUTABLE}
* or {@code CONCURRENT}, or that are * or {@code CONCURRENT}, or that are
* <a href="Spliterator.html#binding">late-binding</a>, it is likely * <a href="../Spliterator.html#binding">late-binding</a>, it is likely
* more efficient to use {@link #intStream(Spliterator.OfInt)} instead. * more efficient to use {@link #intStream(Spliterator.OfInt)} instead.
* The use of a {@code Supplier} in this form provides a level of * The use of a {@code Supplier} in this form provides a level of
* indirection that reduces the scope of potential interference with the * indirection that reduces the scope of potential interference with the
...@@ -286,7 +290,7 @@ public class StreamSupport { ...@@ -286,7 +290,7 @@ public class StreamSupport {
* *
* <p>It is strongly recommended the spliterator report a characteristic of * <p>It is strongly recommended the spliterator report a characteristic of
* {@code IMMUTABLE} or {@code CONCURRENT}, or be * {@code IMMUTABLE} or {@code CONCURRENT}, or be
* <a href="Spliterator.html#binding">late-binding</a>. Otherwise, * <a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
* {@link #stream(Supplier, int)} should be used to * {@link #stream(Supplier, int)} should be used to
* reduce the scope of potential interference with the source. See * reduce the scope of potential interference with the source. See
* <a href="package-summary.html#Non-Interference">Non-Interference</a> for * <a href="package-summary.html#Non-Interference">Non-Interference</a> for
...@@ -310,7 +314,7 @@ public class StreamSupport { ...@@ -310,7 +314,7 @@ public class StreamSupport {
* *
* <p>It is strongly recommended the spliterator report a characteristic of * <p>It is strongly recommended the spliterator report a characteristic of
* {@code IMMUTABLE} or {@code CONCURRENT}, or be * {@code IMMUTABLE} or {@code CONCURRENT}, or be
* <a href="Spliterator.html#binding">late-binding</a>. Otherwise, * <a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
* {@link #stream(Supplier, int)} should be used to * {@link #stream(Supplier, int)} should be used to
* reduce the scope of potential interference with the source. See * reduce the scope of potential interference with the source. See
* <a href="package-summary.html#Non-Interference">Non-Interference</a> for * <a href="package-summary.html#Non-Interference">Non-Interference</a> for
...@@ -335,7 +339,7 @@ public class StreamSupport { ...@@ -335,7 +339,7 @@ public class StreamSupport {
* *
* <p>For spliterators that report a characteristic of {@code IMMUTABLE} * <p>For spliterators that report a characteristic of {@code IMMUTABLE}
* or {@code CONCURRENT}, or that are * or {@code CONCURRENT}, or that are
* <a href="Spliterator.html#binding">late-binding</a>, it is likely * <a href="../Spliterator.html#binding">late-binding</a>, it is likely
* more efficient to use {@link #longStream(Spliterator.OfLong)} instead. * more efficient to use {@link #longStream(Spliterator.OfLong)} instead.
* The use of a {@code Supplier} in this form provides a level of * The use of a {@code Supplier} in this form provides a level of
* indirection that reduces the scope of potential interference with the * indirection that reduces the scope of potential interference with the
...@@ -369,7 +373,7 @@ public class StreamSupport { ...@@ -369,7 +373,7 @@ public class StreamSupport {
* *
* <p>For spliterators that report a characteristic of {@code IMMUTABLE} * <p>For spliterators that report a characteristic of {@code IMMUTABLE}
* or {@code CONCURRENT}, or that are * or {@code CONCURRENT}, or that are
* <a href="Spliterator.html#binding">late-binding</a>, it is likely * <a href="../Spliterator.html#binding">late-binding</a>, it is likely
* more efficient to use {@link #longStream(Spliterator.OfLong)} instead. * more efficient to use {@link #longStream(Spliterator.OfLong)} instead.
* The use of a {@code Supplier} in this form provides a level of * The use of a {@code Supplier} in this form provides a level of
* indirection that reduces the scope of potential interference with the * indirection that reduces the scope of potential interference with the
...@@ -402,7 +406,7 @@ public class StreamSupport { ...@@ -402,7 +406,7 @@ public class StreamSupport {
* *
* <p>It is strongly recommended the spliterator report a characteristic of * <p>It is strongly recommended the spliterator report a characteristic of
* {@code IMMUTABLE} or {@code CONCURRENT}, or be * {@code IMMUTABLE} or {@code CONCURRENT}, or be
* <a href="Spliterator.html#binding">late-binding</a>. Otherwise, * <a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
* {@link #stream(Supplier, int)} should be used to * {@link #stream(Supplier, int)} should be used to
* reduce the scope of potential interference with the source. See * reduce the scope of potential interference with the source. See
* <a href="package-summary.html#Non-Interference">Non-Interference</a> for * <a href="package-summary.html#Non-Interference">Non-Interference</a> for
...@@ -426,7 +430,7 @@ public class StreamSupport { ...@@ -426,7 +430,7 @@ public class StreamSupport {
* *
* <p>It is strongly recommended the spliterator report a characteristic of * <p>It is strongly recommended the spliterator report a characteristic of
* {@code IMMUTABLE} or {@code CONCURRENT}, or be * {@code IMMUTABLE} or {@code CONCURRENT}, or be
* <a href="Spliterator.html#binding">late-binding</a>. Otherwise, * <a href="../Spliterator.html#binding">late-binding</a>. Otherwise,
* {@link #stream(Supplier, int)} should be used to * {@link #stream(Supplier, int)} should be used to
* reduce the scope of potential interference with the source. See * reduce the scope of potential interference with the source. See
* <a href="package-summary.html#Non-Interference">Non-Interference</a> for * <a href="package-summary.html#Non-Interference">Non-Interference</a> for
...@@ -451,7 +455,7 @@ public class StreamSupport { ...@@ -451,7 +455,7 @@ public class StreamSupport {
* <p> * <p>
* For spliterators that report a characteristic of {@code IMMUTABLE} * For spliterators that report a characteristic of {@code IMMUTABLE}
* or {@code CONCURRENT}, or that are * or {@code CONCURRENT}, or that are
* <a href="Spliterator.html#binding">late-binding</a>, it is likely * <a href="../Spliterator.html#binding">late-binding</a>, it is likely
* more efficient to use {@link #doubleStream(Spliterator.OfDouble)} instead. * more efficient to use {@link #doubleStream(Spliterator.OfDouble)} instead.
* The use of a {@code Supplier} in this form provides a level of * The use of a {@code Supplier} in this form provides a level of
* indirection that reduces the scope of potential interference with the * indirection that reduces the scope of potential interference with the
...@@ -485,7 +489,7 @@ public class StreamSupport { ...@@ -485,7 +489,7 @@ public class StreamSupport {
* *
* <p>For spliterators that report a characteristic of {@code IMMUTABLE} * <p>For spliterators that report a characteristic of {@code IMMUTABLE}
* or {@code CONCURRENT}, or that are * or {@code CONCURRENT}, or that are
* <a href="Spliterator.html#binding">late-binding</a>, it is likely * <a href="../Spliterator.html#binding">late-binding</a>, it is likely
* more efficient to use {@link #doubleStream(Spliterator.OfDouble)} instead. * more efficient to use {@link #doubleStream(Spliterator.OfDouble)} instead.
* The use of a {@code Supplier} in this form provides a level of * The use of a {@code Supplier} in this form provides a level of
* indirection that reduces the scope of potential interference with the * indirection that reduces the scope of potential interference with the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册