June 2017
Beginner
1296 pages
69h 23m
English
Section 17.3 mentioned that each intermediate operation results in a new stream. Each new stream is simply an object representing the processing steps that have been specified to that point in the pipeline. Chaining intermediate-operation method calls adds to the set of processing steps to perform on each stream element. The last stream object in the stream pipeline contains all the processing steps to perform on each stream element.
When you initiate a stream pipeline with a terminal operation, the intermediate operations’ processing steps are applied for a given stream element before they are applied to the next stream element. So the stream pipeline in Fig. 17.7 operates as follows:
For each ...Read now
Unlock full access