Using Java Streams
The Stream API is an in-memory implementation of the map/filter/reduce pattern, introduced in Java 8. In this course, you will learn the basics of this API, how you can use it to improve your code, and how this implementation works internally.
What you'll learn
The Stream API is now one of the two main API used to processed data in Java. It implements a very popular pattern: map/filter/reduce. In this course, Using Java Streams, you will learn three things. First, you will see how this map/filter/reduce pattern works and how you can recognize its use in existing code. Then, you will explore how it has been implemented by the Stream API, and what the details are of this implementation to fully understand how you can leverage this API to write clean and efficient code. Finally, you will discover how to implement common use cases that will help you use this API very quickly in your applications. By the end of this course, you will have explored the theory to fully understand both the algorithm and the implementation.
Table of contents
- Version Check 0m
- Introducing the Course and Its Agenda 3m
- Who Are You? What Should You Know to Follow This Course? 1m
- Module Agenda, Using the Map / Filter / Reduce Algorithm 2m
- Introducing the Mapping, the Filtering, and the Reduction Steps 2m
- Defining the Mapping and the Filtering Steps 2m
- Implementing Map / Filter / Reduce with the Iterator Pattern 2m
- Trying to Implement Map / Filter / Reduce on the Collection API 1m
- Analyzing the Map / Filter Implementation on the Collection API 2m
- Desiging the Stream API to Avoid Duplicating the Processed Data 2m
- Implementing Map / Filter / Reduce on the Stream API 3m
- Defining Intermediate and Terminal Operations on Streams 2m
- Module Wrap Up 2m
- Introducing the Module and Its Agenda 2m
- Live Demo: Writing a First Stream that Counts Empty Names 4m
- Live Demo: Getting Errors When Processing the Same Stream Twice 5m
- Streaming Related Entities with the FlatMap Operator 3m
- Live Demo: Flat Mapping Related Enties from a Stream of Entities 4m
- Module Wrap Up 1m
- Introducing the Module and Its Agenda 1m
- Live Demo: Creating Streams from an Array of Objects 2m
- Live Demo: Streaming the Lines of a Text File 3m
- Live Demo: Streaming the Splitting of a String 3m
- Live Demo: Streaming the Letters of a String 4m
- Live Demo: Selecting Ranges of the Elements of a Stream 3m
- Live Demo: Using a Predicate to Control the Closing of a Stream 4m
- Module Wrap Up 2m
- Introducing the Module and Its Agenda 1m
- Refactoring a Simple For Loop to a Stream Implementation 6m
- Identifying the Three Steps of Refactoring Iterators to Streams 1m
- Duplicating For Loops to Prepare for a Stream Refactoring 4m
- Refactoring Complex for Loops to Clean Stream Patterns 4m
- Refactoring Iterators to Streams Wrap Up 2m
- Module Wrap Up 2m
- Introducing the Module and Its Agenda 1m
- Implementing Reductions with a BinaryOperator 4m
- Introducing the Problem of the Reduction of Empty Streams 1m
- Computing the Reduction of Empty Streams 5m
- Introducing Optional for Reductions with No Identity Element 1m
- Implementing Reductions That Have an Identity Element 2m
- Using Optional to Handle Reductions with No Identity Element 2m
- Getting the Content of an Optional 2m
- Live Demo: Opening an Optional 2m
- Live Demo: Passing a Wrong Identity Element to Reductions 2m
- Live Demo: Computing a Max and a Min on a CSV File Using Streams 5m
- Live Demo: Using a Specialized Stream to Compute Statistics 3m
- Module Wrap Up 2m
- Introducing the Module and Its Agenda 1m
- Using a Collector to Reduce a Stream in a Mutable Container 1m
- Reducing Stream Data in a List, a Set, or in Any Collection 3m
- Live Demo: Collecting a Stream in a List, a Set, or an Array 3m
- Live Demo: Joining a Stream of String with a Collector 2m
- Module and Course Wrap Up 1m
- Introducing the Module and Its Agenda 1m
- Creating Maps with the GroupingBy Collector 3m
- Adding a Downstream Collector to the GroupingBy Collector 2m
- Live Demo: Grouping the Cities by Their State 3m
- Live Demo: Creating the Histogram of Number of Cities per State 5m
- Live Demo: Analyzing Histograms by Streaming Maps with EntrySet 5m
- Module Wrap Up 1m
- Course Wrap Up 4m