Readability and performance: Stream.forEach vs “for” loop
8
Refactoring “for” loop to Stream.collect
9
Readability and performance: Stream.collect vs “for” loop
10
Collapsing multiple operations
11
Readability and performance: multiple operations
12
Refactoring “for” loop to Stream.anyMatch
13
Readability and performance: “for” loop vs Stream.anyMatch
14
Refactoring “for” loop to Stream.findFirst
15
Readability and performance: “for” loop vs Stream.findFirst
16
Refactoring to Collection.removeIf
17
Readability and performance: Collection.removeIf
18
Summary of findings
19
Q & A
Description:
Explore the benefits of Java 8 in this 71-minute conference talk by Trisha Gee. Learn how to automatically refactor code to leverage Java 8 features, comparing performance and readability before and after. Discover the advantages of lambda expressions, stream operations, and new collection methods. Gain insights into safety checks, designing for lambdas, and optimizing various loop constructs. Analyze the readability and performance implications of different refactoring approaches, including Stream.forEach, Stream.collect, Stream.anyMatch, Stream.findFirst, and Collection.removeIf. Conclude with a summary of findings and a Q&A session to deepen your understanding of effective Java 8 refactoring techniques.