-
Course
- Core Tech
From Collections to Streams in Java 8 Using Lambda Expressions
This course shows the new patterns introduced in Java 8, based on lambda expressions, the functional interfaces, the Collection Framework and the Stream API.
What you'll learn
Java 8 brought many new patterns to build efficient and clean applications. In this course, we cover one most important new thing: lambda expressions. Lambdas are a nice thing, but would be useless without new patterns to process data. These new patterns have been added to the Collection Framework, and to a the new Stream API. This course quickly explains what the map / filter / reduce pattern is about, and why is has been added to the Stream API. This new API is precisely described: how it can be used to efficiently process data and how it can be used in parallel. Caveats and corner cases are also shown.
Table of contents
- Introduction to the Course | 3m 7s
- What Are You Going to Learn in This Course? | 2m 9s
- Agenda of the Course | 1m 31s
- Who Are You? What Should You Know to Follow This Course? | 1m 40s
- Agenda of This Module | 1m 5s
- Lambda Expression: Introduction, Instances of Anonymous Classes | 3m 24s
- Lambda Expression: Passing Code as a Parameter | 2m 9s
- Let Us Write Our First, Simple Lambda Expressions | 3m 2s
- Lambda Expression: Remarks and Precisions | 1m 51s
- Method References: A First Example with an Instance Method | 2m 29s
- Method References: A Second Example with a Static Method | 2m 9s
- Method References: The System.out.println Pattern | 1m 32s
- How to Create New API: Default and Static Methods in Interfaces | 2m 6s
- Live Coding Introduction: The Comparator Example | 53s
- Implementing a Comparator with Lambda Expressions | 2m 17s
- Comparing by Age, Last Name, and First Name | 57s
- Refactoring the Comparison with a Key Extractor | 2m
- Implementing the Comparator.comparing Static Method | 2m 48s
- Making the Key Extractor Generic, Returning Comparable Objects | 2m 3s
- Chaining Comparators with the thenComparing Default Method | 2m 7s
- Writing the Comparator.thenComparing Implementation | 1m 36s
- Writing the Final Comparator Creation and Chaining Pattern | 2m 47s
- Wrap-up of the Module | 1m 56s
- Version Check | 15s
- Introduction to the Module | 1m 34s
- What Is a Functional Interface? The Predicate Example | 2m 1s
- How to Implement a Functional Interface with a Lambda Expression | 2m 7s
- How Does the Compiler Recognize the Type of a Lambda Expression? | 3m 52s
- A Lambda Is Still an Interface with Usable Methods | 35s
- Functional Interface: The Complete and Exact Definition | 3m 24s
- How to Use the @FunctionalInterface Annotation | 2m 50s
- The Four Categories of the java.util.function Package | 1m 8s
- First Category: The Consumers | 59s
- Second Category: The Supplier | 1m 24s
- Third Category: The Functions | 2m 31s
- Fourth Category: The Predicates | 1m 8s
- Functional Interfaces for Java Primitive Types | 1m 29s
- Introduction to the Live Coding Section: The Predicate Example | 1m 34s
- Writing and Using a First, Simple Predicate Lambda Expression | 1m 49s
- Chaining Predicates with the AND Boolean Operation | 1m 44s
- Adding a and() Method on the Predicate Functional Interface | 1m 35s
- Implementing the and() Default method on the Predicate Interface | 3m 44s
- Adding a or() Default Method on the Predicate Interface | 3m 12s
- Creating Predicates with a Static Call on a Functional Interface | 2m 41s
- Making the isEqualsTo() Method Generic of the Predicate Interface | 1m 32s
- Live Coding Wrap-up | 1m 14s
- Module Wrap-up, Presentation of the Next Module | 1m 53s
About the author
Passionate about programming computers for over 20 years, Jose made his debut in assembler and C, C for SIMD parallel machines before adopting Java as an object-oriented language. Assistant professor in Paris North University for more than 15 years, Jose also brings his expertise to many projects, in various industrial fields.
More Courses by Jose