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

Using streams to process big data sets

A Stream interface is a sequence of elements that can be filtered and transformed to get a final result sequentially or in parallel. This final result can be a primitive data type (an integer, a long ...), an object or a data structure. These are the characteristics that better define Stream:

  • A stream is a sequence of data, not a data structure.
  • You can create streams from different sources as collections (lists, arrays...), files, strings, or a class that provides the elements of the stream.
  • You can't access an individual element of the streams.
  • You can't modify the source of the stream.
  • Streams define two kinds of operations: intermediate operations that produce a new Stream interface that allows ...

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