© Kishori Sharan 2017

Kishori Sharan, Java 9 Revealed, 10.1007/978-1-4842-2592-9_18

18. Streams API Updates

Kishori Sharan

(1)Montgomery, Alabama, USA

In this chapter, you will learn:

  • New convenience methods added to the Stream interface for stream processing

  • New collectors added to the Collectors class

JDK 9 added few convenience methods to the Streams API. I categorize them based on the type they have been added to:

  • The Stream interface

  • The Collectors class

Methods in the Stream interface define new stream operations, whereas methods in the Collectors class define new collectors. The following sections describe them in detail. The source code for this chapter is in a module named com.jdojo.streams, whose declaration is shown in Listing 18-1.

Listing ...

Get Java 9 Revealed: For Early Adoption and Migration now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.