Verifying conditions in the elements of a stream

One interesting option provided by the Stream class is the possibility to check if the elements of the stream verify a condition or not. This functionality is provided by the terminal operations that return a Boolean value.

In this recipe, you will learn which methods provide the Stream class to check conditions in the elements of a stream and how to use them.

Get Java 9 Concurrency Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.