The most widely used API in the JDK is undoubtedly the Collection API. Brilliantly designed over 15 years ago, it remains at the heart of all Java applications today. In 2004, it underwent its first major upgrade with the introduction of generics. While important, this update did not change its usage patterns. With the introduction of lambdas in Java 8, the Collection API is rewritten once again, but this time the situation is different: its usage patterns have completely changed.
The first part of this presentation introduces lambda expressions, how to write them, and what they bring us as developers. The second part details the new patterns introduced by the Stream and Collector APIs. These new APIs will change how we can process large collections, including in parallel, with a very simple programming model and powerful patterns. This power will be demonstrated through real examples, showing how Java 8 can help us write efficient and performant code in a straightforward way.