O'Reilly logo

Java Closures and Lambda by Robert Fischer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 3

image

Lambda’s Domain: Collections, Maps, and Streams

In the last chapter, we saw how lambdas themselves work, but we explicitly focused on lambdas without creating a context for their use. We extracted lambdas from their natural environment in order to analyze them under a microscope. In this chapter, we will begin to see lambdas in the wild.

Specifically, we will see how lambdas can be used with the familiar structures of collections and maps. However, collections and maps actually limit the power of lambdas. To get at their true power, Java introduced a new concept using an old word: streams. This chapter will close with an analysis of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required