The lambda expressions described and demonstrated in the previous chapter, together with functional interfaces, added a powerful functional programming capability to Java. It allows for passing behaviors (functions) as parameters to the libraries optimized for the performance of the data processing. This way, an application programmer can concentrate on the business aspects of the developed system, leaving the performance aspects to the specialists: the authors of the library. One example of such a library is the java.util.stream package, which is going to be the focus of this chapter.
We will introduce the concept of data streams processing, and will explain what streams are, how to process them, and how to build processing pipelines. We will also show how easily one can organize stream processing in parallel.
In this chapter, the following topics will...