Lambdas+Streams Beyond The Basics - Jfokus

Lambdas & Streams In JDK 8: Beyond The Basics

Simon Ritter Deputy CTO, Azul Systems

@speakjava

? Copyright Azul Systems 2016

? Copyright Azul Systems 2015

1

A clever man learns from his mistakes...

...a wise man learns from other people's

? Copyright Azul Systems 2016

Agenda

? Lambdas and Streams Primer ? Delaying Execution ? Avoiding Loops In Streams ? The Art Of Reduction ? Lambdas and Streams and JDK 9 ? Conclusions

? Copyright Azul Systems 2016

3

Lambdas And Streams Primer

? Copyright Azul Systems 2016

Lambda Expressions In JDK 8

Simplified Parameterised Behaviour

? Old style, anonymous inner classes

new Thread(new Runnable { public void run() { doSomeStuff(); }

}).start();

? New style, using a Lambda expression

new Thread(() -> doSomeStuff()).start();

? Copyright Azul Systems 2016

5

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download