O'Reilly logo

Java 9 Concurrency Cookbook - Second Edition by Javier Fernández González

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

Transforming the elements of a stream

Some of the most useful intermediate operations you can use with streams are those that allow you to transform the elements of the stream. These operations receive elements of a class and return the elements of a different class. You can even change the type of stream and generate an IntStream, LongStream, or DoubleStream from Stream.

In this recipe, you will learn how to use the transforming intermediate operations provided by the Stream class to convert its elements into a different class.

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