Using Java Lambda Expressions
Lambda Expressions are one of the foundation of the Java language available since Java 8. In this course, you will learn a very simple method to write lambda expressions that always works and how to chain and compose them.
What you'll learn
Lambda Expressions are one of the foundations of the Java language since Java 8, but it can be a bit tricky. In this course, Using Java Lambda Expressions, you will learn how to write these expressions in a simple method that will never fail. First, you will see how to write lambda expressions using a simple method that you can use in any kind of situation. Then, you will learn how to chain and compose lambdas, leveraging the default methods from the interfaces these lambdas are implementing. Finally, you will hear about performances and see how to avoid performance hits by using specialized lambdas. By the end of this course, you will be able to write suppliers, consumers, predicates and functions: the four fundamental interfaces from the java.util.function toolbox.
Table of contents
- Version Check 0m
- Introducing the Course: Writing Lambda Expressions in Java 2m
- Who Are You? What Should You Know to Follow this Course? 1m
- Introducing the Agenda of the Course and This Module 0m
- Implementing Functional Interfaces with Lambda Expression 1m
- What Is a Functional Interface? 3m
- Implementing a Functional Interface in Three Easy Steps 2m
- Live Coding: Implementing and Running the Supplier Interface 4m
- Live Coding: Implementing and Running the Consumer Interface 4m
- Module Wrap Up 1m
- Introducing the Module and Its Agenda 1m
- Using the java.util.function Toolbox to Write Lamdba Expressions 1m
- Introducing Suppliers, Consumers, Predicates, and Functions 3m
- Adding the Runnable Interface to the Standard Toolbox 1m
- Implementing Pre Java 8 Interfaces with Lambda Expressions 2m
- Live Coding: Filtering a List with a Predicate 5m
- Live Coding: Mapping a List with a Function 6m
- Wrapping up the Four Categories of Functional Interfaces 1m
- Module Wrap Up 1m
- Introducing the Module and Its Agenda 1m
- Creating Lambdas by Chaing and Composing Other Lambdas 0m
- Live Coding: Creating a Consumer by Chaining Two Consumers 3m
- Live Coding: Applying Boolean Operations on Predicates 4m
- Live Coding: Creating Comparators with Factory Methods 7m
- Live Coding: Combining Comparators with Their Default Methods 3m
- Module Wrap Up 1m
- Course Wrap Up 2m