07, 10 chapters
lambdas and streams
everything.functional
lambdas and streams
functions as values, and pipelines that process data lazily, one element at a time.
- 07.01lambdassyntax, target typing, and why captured variables must be effectively final.
- 07.02functional interfacesFunction, Supplier, Consumer, Predicate and the rest of the zoo.
- 07.03method referencesthe four kinds of ::, and what each one desugars to.
- 07.04how a stream pipeline runssource → intermediate → terminal. lazy, one element at a time.
- 07.05stream operationsmap, filter, flatMap, sorted, distinct, limit, takeWhile.
- 07.06collectorstoList, groupingBy, partitioningBy, toMap, teeing.
- 07.07reductionreduce with identity, accumulator, combiner. and when to use collect instead.
- 07.08primitive streamsIntStream and friends, and the cost of boxing.
- 07.09gatherersjava 24+custom intermediate operations: windows, scans, and mapConcurrent.
- 07.10parallel streamsspliterators, the common pool, and when parallel is slower.