O'Reilly logo

Mastering Lambdas by Maurice Naftalin

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

image

CHAPTER5

Starting Streams: Sources and Spliterators

Chapter 3 briefly introduced the subject of stream sources in general, but the subsequent stream processing examples have all used either collections or stream factory methods for their source. This reflects the expected mainstream usage, but it is now time to explore other aspects of stream creation. In this chapter we will cover

• Stream-bearing methods of the platform classes

• Treatment of exceptions thrown by stream sources and in intermediate operations

• The mechanism by which stream sources work

• An example bringing these topics together

5.1 Creating Streams

After the stream-bearing ...

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