JCrete2013:Java 8

From WikiEducator
Jump to: navigation, search
Java 8 Streams/Collections/Fluent APIs
Convenor: Maurice Naftalin, Kruno, Marc Hoffman
Participants:
Summary:
Day 3, Session 3 - Navigating the Stream API (Java 8) - JCrete2013


Free content media streamed from Wikimedia Commons
Cc-sa.svg

Download:
Download: .ogg

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

Recommendations: