-
Course
- Core Tech
Streams, Collectors, and Optionals for Data Processing in Java 8
This course shows advanced patterns to process data in Java 8 using lambdas, streams, spliterators, optionals, and collectors. It shows how to build your own spliterators to connect streams to non-standard data sources, and to build your own collectors.
What you'll learn
The Stream API and the Collectors are two new additions to the JDK in Java 8 that allow the efficient processing of data using the map / filter / reduce approach. It brings many new patterns on the table, and ways to extend them. We show how to connect streams to non-standard sources of data, how to build streams on other streams. The notion of Optional, introduced to handle the reduction of empty streams is also shown on advanced data processing patterns. And at last, collectors are shown, basic patterns first then advanced ones, where we build our own custom collector.
Table of contents
- Introduction to the Course | 2m 1s
- What Are You Going to Learn in This Course? | 2m 33s
- What Should You Know to Follow This Course? Agenda of This Module | 2m 25s
- What Is a Spliterator? | 3m 55s
- The Spliterator Interface, What Do We Need to Implement? | 3m 18s
- The ArrayListSpliterator: the tryAdvance() Method | 2m 5s
- The ArrayListSpliterator: the trySplit() Method | 2m 39s
- Introduction to the Live Coding: How to Write a Spliterator | 1m 56s
- Using Our Own Spliterator: Setting up the Application | 2m 13s
- Using Our Own Spliterator: Writing the Use Case Pattern | 2m 11s
- Implementing Our Own Spliterator: The First Methods | 3m 4s
- Implementing Our Own Spliterator: The tryAdvance() Method | 3m 37s
- Implementing the tryAdvance() Method: Setting the Returned Object | 1m 50s
- Implementing Our Own Spliterator: Running the Example | 1m 10s
- Live Coding Session Wrap-up | 1m 12s
- Module Wrap-up | 1m 32s
- Version Check | 15s
- Introduction and Agenda of the module | 1m 53s
- Concatenating Streams: The Stream.concat Pattern | 3m 5s
- Merging Streams: The Stream.of and flatMap Pattern | 2m 50s
- How Does the flatMap Pattern Work: Examples | 1m 43s
- Splitting a Text into Words Using the flatMap Pattern | 3m 25s
- Splitting a Text into Words: Putting the Result in a Set | 1m 33s
- State of a Stream: The Stream.characteristics() Method | 2m 51s
- What Are the Eight Characteristics of a Stream? | 2m 10s
- How Does the Steam Methods Modify the State of a Stream | 2m 30s
- State of a Stream: A First Example | 2m 3s
- How to Use the Stream.sorted() Method with a Comparator | 54s
- Live Coding Session: Presentation of the Example | 1m 48s
- Live Coding: Merging Streams Using Stream.of and flatMap | 3m 20s
- Live Coding: Splitting a Large Text in Words Using flatMap | 3m 38s
- Live Coding Session Summary | 51s
- Streams of Numbers: Converting from a Stream of Objects | 1m 50s
- Optimizing the Conversion from a Stream of Objects | 1m 27s
- Patterns to Build Streams of Numbers | 1m 41s
- Specialized Methods: min(), max() and summaryStatistics() | 2m 49s
- Live Coding Session: Introduction of the Scrabble Example | 2m 1s
- Live Coding: Computing the Score of a Word in Scrabble | 3m 25s
- Live Coding: Getting the Word with the Best Score | 3m 18s
- Live Coding: Computing Statistics on the Words of Shakespeare | 1m 56s
- Live Coding Session and Module Wrap-up | 2m 41s
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