Section 17.2.3 Streams
• Streams (p. 734) are objects that implement interface Stream (from the package java.util.stream) and enable you to perform functional programming tasks. There are also specialized stream interfaces for processing int, long or double values.
• Streams move elements through a sequence of processing steps—known as a stream pipeline—that begins with a data source, performs various intermediate operations on the data source’s elements and ends with a terminal operation. A stream pipeline is formed by chaining method calls.
• Unlike collections, streams do not have their own storage—once a stream is processed, it cannot be reused, because it does not maintain a copy of the original data source.
• An intermediate operation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access