Summary:
Without wanting to repeat what is in the slides, here are some quick takeaways from the presentation:
Lambdas - functional programming for Java. Typed by context.
Can invert collection processing. E.g. List.replaceAll(function).
Hardware is moving to multiples CPU cores and software must adapt to allow itself to be distributed across cores.
Stream API - a sequence of values, not a collection. Feeds you values as you need them. Source can be Collection, IO, function, ...
Stream can be infinitely long. Primitive specialisations exist for performance (int, long, double).
Intermediate Operation - output is a new stream. E.g. (filter, map, sort).
Terminal Operation - exhausts a stream to return a non-stream value. E.g. (min, max, count).
Collectors can be added as last operation to accumulate results.
The presentation slides
|