Overview
Syllabus
Introduction
Introducing the Stream API
Connecting a Stream to a source of data
Calling method on a Stream
Making the difference intermediate and terminal operations
Triggering the computation with a terminal operation
Producing elements with an intermadiate operation
Validating elements with flatMap and mapMulti
Terminating a stream with an intermediate operation
Delaying the start of a computation with an internal mutable state
Bufferzing stream elements in an intermadiate operation
Methods you should only use for debugging
Characteristics of a Stream
Using forEach for debugging
Reducing a stream with count, min, max, sum, or average
Short-circuiting a stream with terminal operations
Reducing a stream in a mutable container with a collector
Creating your own Collector from a supplier, and an accumulator
Adding a finisher to a Collector to create non modifiable containers
Using collectors outside of the Stream API
Going parallel with Streams
Using parallel streams with SIZED and SUBSIZED sources
Sharing mutable state in parallel streams
Reducing parallel streams with associative reductions
Choosing to use parallel streams
Modeling intermediate stream operations with Gatherers
Writing a mapping Gatherer
Writing an interrupting Gatherer holding an internal mutable state
Managing the stream interruption with your integrator
Optimizing a Gatherer with a greedy integrator
Writing a sliding window Gatherer
Writing a correct windowing Gatherer with a finisher
Implementing a parallel Gatherer with a combiner
Adding the combiner to enable parallel gathering
Using non-parallel Gatherers in parallel Streams
Wrapping up Gatherers
That's it for today, talk to you soon!
Taught by
Java