On page 174:
StreamAPI
Should probably be
Stream API
Also on page 174:
blow up with an exception
Suggesting to change this wherever it occurs. This is really an unfortunate choice of words. We raise or throw an exception. “Blowing up” really suggest uncontrolled trundling maybe leading to process termination, as happens in a segmentation fault. After all, an exception is just a managed way of transferring control and dumping no-longer useful data structures overboard.
On page 175
If the version of Java you’re using supports sealed classes
This is:
One should indicate “since Java 17, September 2021”
Moreover
Is the work “functional pipeline” the correct terminology? The official word is “stream pipline” apparently:
https://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html
To perform a computation, stream operations are composed into a stream pipeline. A stream pipeline consists of a source (which might be an array, a collection, a generator function, an I/O channel, etc), zero or more intermediate operations (which transform a stream into another stream, such as
filter(Predicate)
and a terminal operation (which produces a result or side-effect, such ascount()
orforEach(Consumer)
. Streams are lazy; computation on the source data is only performed when the terminal operation is initiated, and source elements are consumed only as needed.