Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 11 java.base.jmod - Base Module
JDK 11 java.base.jmod is the JMOD file for JDK 11 Base module.
JDK 11 Base module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.base.jmod.
JDK 11 Base module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Base module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.base.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ java/util/stream/StreamSupport.java
/* * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.util.stream; import java.util.Objects; import java.util.Spliterator; import java.util.function.Supplier; /** * Low-level utility methods for creating and manipulating streams. * * <p>This class is mostly for library writers presenting stream views * of data structures; most static stream methods intended for end users are in * the various {@code Stream} classes. * * @since 1.8 */ public final class StreamSupport { // Suppresses default constructor, ensuring non-instantiability. private StreamSupport() {} /** * Creates a new sequential or parallel {@code Stream} from a * {@code Spliterator}. * * <p>The spliterator is only traversed, split, or queried for estimated * size after the terminal operation of the stream pipeline commences. * * <p>It is strongly recommended the spliterator report a characteristic of * {@code IMMUTABLE} or {@code CONCURRENT}, or be * <a href="../Spliterator.html#binding">late-binding</a>. Otherwise, * {@link #stream(java.util.function.Supplier, int, boolean)} should be used * to reduce the scope of potential interference with the source. See * <a href="package-summary.html#NonInterference">Non-Interference</a> for * more details. * * @param <T> the type of stream elements * @param spliterator a {@code Spliterator} describing the stream elements * @param parallel if {@code true} then the returned stream is a parallel * stream; if {@code false} the returned stream is a sequential * stream. * @return a new sequential or parallel {@code Stream} */ public static <T> Stream<T> stream(Spliterator<T> spliterator, boolean parallel) { Objects.requireNonNull(spliterator); return new ReferencePipeline.Head<>(spliterator, StreamOpFlag.fromCharacteristics(spliterator), parallel); } /** * Creates a new sequential or parallel {@code Stream} from a * {@code Supplier} of {@code Spliterator}. * * <p>The {@link Supplier#get()} method will be invoked on the supplier no * more than once, and only after the terminal operation of the stream pipeline * commences. * * <p>For spliterators that report a characteristic of {@code IMMUTABLE} * or {@code CONCURRENT}, or that are * <a href="../Spliterator.html#binding">late-binding</a>, it is likely * more efficient to use {@link #stream(java.util.Spliterator, boolean)} * instead. * <p>The use of a {@code Supplier} in this form provides a level of * indirection that reduces the scope of potential interference with the * source. Since the supplier is only invoked after the terminal operation * commences, any modifications to the source up to the start of the * terminal operation are reflected in the stream result. See * <a href="package-summary.html#NonInterference">Non-Interference</a> for * more details. * * @param <T> the type of stream elements * @param supplier a {@code Supplier} of a {@code Spliterator} * @param characteristics Spliterator characteristics of the supplied * {@code Spliterator}. The characteristics must be equal to * {@code supplier.get().characteristics()}, otherwise undefined * behavior may occur when terminal operation commences. * @param parallel if {@code true} then the returned stream is a parallel * stream; if {@code false} the returned stream is a sequential * stream. * @return a new sequential or parallel {@code Stream} * @see #stream(java.util.Spliterator, boolean) */ public static <T> Stream<T> stream(Supplier<? extends Spliterator<T>> supplier, int characteristics, boolean parallel) { Objects.requireNonNull(supplier); return new ReferencePipeline.Head<>(supplier, StreamOpFlag.fromCharacteristics(characteristics), parallel); } /** * Creates a new sequential or parallel {@code IntStream} from a * {@code Spliterator.OfInt}. * * <p>The spliterator is only traversed, split, or queried for estimated size * after the terminal operation of the stream pipeline commences. * * <p>It is strongly recommended the spliterator report a characteristic of * {@code IMMUTABLE} or {@code CONCURRENT}, or be * <a href="../Spliterator.html#binding">late-binding</a>. Otherwise, * {@link #intStream(java.util.function.Supplier, int, boolean)} should be * used to reduce the scope of potential interference with the source. See * <a href="package-summary.html#NonInterference">Non-Interference</a> for * more details. * * @param spliterator a {@code Spliterator.OfInt} describing the stream elements * @param parallel if {@code true} then the returned stream is a parallel * stream; if {@code false} the returned stream is a sequential * stream. * @return a new sequential or parallel {@code IntStream} */ public static IntStream intStream(Spliterator.OfInt spliterator, boolean parallel) { return new IntPipeline.Head<>(spliterator, StreamOpFlag.fromCharacteristics(spliterator), parallel); } /** * Creates a new sequential or parallel {@code IntStream} from a * {@code Supplier} of {@code Spliterator.OfInt}. * * <p>The {@link Supplier#get()} method will be invoked on the supplier no * more than once, and only after the terminal operation of the stream pipeline * commences. * * <p>For spliterators that report a characteristic of {@code IMMUTABLE} * or {@code CONCURRENT}, or that are * <a href="../Spliterator.html#binding">late-binding</a>, it is likely * more efficient to use {@link #intStream(java.util.Spliterator.OfInt, boolean)} * instead. * <p>The use of a {@code Supplier} in this form provides a level of * indirection that reduces the scope of potential interference with the * source. Since the supplier is only invoked after the terminal operation * commences, any modifications to the source up to the start of the * terminal operation are reflected in the stream result. See * <a href="package-summary.html#NonInterference">Non-Interference</a> for * more details. * * @param supplier a {@code Supplier} of a {@code Spliterator.OfInt} * @param characteristics Spliterator characteristics of the supplied * {@code Spliterator.OfInt}. The characteristics must be equal to * {@code supplier.get().characteristics()}, otherwise undefined * behavior may occur when terminal operation commences. * @param parallel if {@code true} then the returned stream is a parallel * stream; if {@code false} the returned stream is a sequential * stream. * @return a new sequential or parallel {@code IntStream} * @see #intStream(java.util.Spliterator.OfInt, boolean) */ public static IntStream intStream(Supplier<? extends Spliterator.OfInt> supplier, int characteristics, boolean parallel) { return new IntPipeline.Head<>(supplier, StreamOpFlag.fromCharacteristics(characteristics), parallel); } /** * Creates a new sequential or parallel {@code LongStream} from a * {@code Spliterator.OfLong}. * * <p>The spliterator is only traversed, split, or queried for estimated * size after the terminal operation of the stream pipeline commences. * * <p>It is strongly recommended the spliterator report a characteristic of * {@code IMMUTABLE} or {@code CONCURRENT}, or be * <a href="../Spliterator.html#binding">late-binding</a>. Otherwise, * {@link #longStream(java.util.function.Supplier, int, boolean)} should be * used to reduce the scope of potential interference with the source. See * <a href="package-summary.html#NonInterference">Non-Interference</a> for * more details. * * @param spliterator a {@code Spliterator.OfLong} describing the stream elements * @param parallel if {@code true} then the returned stream is a parallel * stream; if {@code false} the returned stream is a sequential * stream. * @return a new sequential or parallel {@code LongStream} */ public static LongStream longStream(Spliterator.OfLong spliterator, boolean parallel) { return new LongPipeline.Head<>(spliterator, StreamOpFlag.fromCharacteristics(spliterator), parallel); } /** * Creates a new sequential or parallel {@code LongStream} from a * {@code Supplier} of {@code Spliterator.OfLong}. * * <p>The {@link Supplier#get()} method will be invoked on the supplier no * more than once, and only after the terminal operation of the stream pipeline * commences. * * <p>For spliterators that report a characteristic of {@code IMMUTABLE} * or {@code CONCURRENT}, or that are * <a href="../Spliterator.html#binding">late-binding</a>, it is likely * more efficient to use {@link #longStream(java.util.Spliterator.OfLong, boolean)} * instead. * <p>The use of a {@code Supplier} in this form provides a level of * indirection that reduces the scope of potential interference with the * source. Since the supplier is only invoked after the terminal operation * commences, any modifications to the source up to the start of the * terminal operation are reflected in the stream result. See * <a href="package-summary.html#NonInterference">Non-Interference</a> for * more details. * * @param supplier a {@code Supplier} of a {@code Spliterator.OfLong} * @param characteristics Spliterator characteristics of the supplied * {@code Spliterator.OfLong}. The characteristics must be equal to * {@code supplier.get().characteristics()}, otherwise undefined * behavior may occur when terminal operation commences. * @param parallel if {@code true} then the returned stream is a parallel * stream; if {@code false} the returned stream is a sequential * stream. * @return a new sequential or parallel {@code LongStream} * @see #longStream(java.util.Spliterator.OfLong, boolean) */ public static LongStream longStream(Supplier<? extends Spliterator.OfLong> supplier, int characteristics, boolean parallel) { return new LongPipeline.Head<>(supplier, StreamOpFlag.fromCharacteristics(characteristics), parallel); } /** * Creates a new sequential or parallel {@code DoubleStream} from a * {@code Spliterator.OfDouble}. * * <p>The spliterator is only traversed, split, or queried for estimated size * after the terminal operation of the stream pipeline commences. * * <p>It is strongly recommended the spliterator report a characteristic of * {@code IMMUTABLE} or {@code CONCURRENT}, or be * <a href="../Spliterator.html#binding">late-binding</a>. Otherwise, * {@link #doubleStream(java.util.function.Supplier, int, boolean)} should * be used to reduce the scope of potential interference with the source. See * <a href="package-summary.html#NonInterference">Non-Interference</a> for * more details. * * @param spliterator A {@code Spliterator.OfDouble} describing the stream elements * @param parallel if {@code true} then the returned stream is a parallel * stream; if {@code false} the returned stream is a sequential * stream. * @return a new sequential or parallel {@code DoubleStream} */ public static DoubleStream doubleStream(Spliterator.OfDouble spliterator, boolean parallel) { return new DoublePipeline.Head<>(spliterator, StreamOpFlag.fromCharacteristics(spliterator), parallel); } /** * Creates a new sequential or parallel {@code DoubleStream} from a * {@code Supplier} of {@code Spliterator.OfDouble}. * * <p>The {@link Supplier#get()} method will be invoked on the supplier no * more than once, and only after the terminal operation of the stream pipeline * commences. * * <p>For spliterators that report a characteristic of {@code IMMUTABLE} * or {@code CONCURRENT}, or that are * <a href="../Spliterator.html#binding">late-binding</a>, it is likely * more efficient to use {@link #doubleStream(java.util.Spliterator.OfDouble, boolean)} * instead. * <p>The use of a {@code Supplier} in this form provides a level of * indirection that reduces the scope of potential interference with the * source. Since the supplier is only invoked after the terminal operation * commences, any modifications to the source up to the start of the * terminal operation are reflected in the stream result. See * <a href="package-summary.html#NonInterference">Non-Interference</a> for * more details. * * @param supplier A {@code Supplier} of a {@code Spliterator.OfDouble} * @param characteristics Spliterator characteristics of the supplied * {@code Spliterator.OfDouble}. The characteristics must be equal to * {@code supplier.get().characteristics()}, otherwise undefined * behavior may occur when terminal operation commences. * @param parallel if {@code true} then the returned stream is a parallel * stream; if {@code false} the returned stream is a sequential * stream. * @return a new sequential or parallel {@code DoubleStream} * @see #doubleStream(java.util.Spliterator.OfDouble, boolean) */ public static DoubleStream doubleStream(Supplier<? extends Spliterator.OfDouble> supplier, int characteristics, boolean parallel) { return new DoublePipeline.Head<>(supplier, StreamOpFlag.fromCharacteristics(characteristics), parallel); } }
⏎ java/util/stream/StreamSupport.java
Or download all of them as a single archive file:
File name: java.base-11.0.1-src.zip File size: 8740354 bytes Release date: 2018-11-04 Download
2020-05-29, 205315👍, 0💬
Popular Posts:
jlGui is a music player for the Java platform. It is based on Java Sound 1.0 (i.e. JDK 1.3+). It sup...
maven-core-3.5.4.jar is the JAR file for Apache Maven 3.5.4 Core module. Apache Maven is a software ...
JDK 11 jdk.scripting.nashorn.jm odis the JMOD file for JDK 11 Scripting Nashorn module. JDK 11 Scrip...
What Is junit-3.8.1.jar? junit-3.8.1.jar is the version 3.8.1 of JUnit JAR library file. JUnit is a ...
What Is javamail1_1_3.zip? javamail1_1_3.zip is the binary package of JavaMail API 1.1.3 in ZIP form...