Stream Gatherers - Deep Dive with the Expert

Java β€’ April 3, 2025
Video Thumbnail
Java Logo

Java

@java

About

The official Java channel covering the Java platform, OpenJDK, and the Java ecosystem. Make sure to check https://inside.java and https://dev.java

Video Description

πŸ‘‰ Join us for JavaOne 2026. Sign up now to get ongoing updates https://go.oracle.com/LP=149517 Have you ever wanted to perform an operation on a java.util.stream.Stream only to find that the existing set of intermediate operations didn't provide what you needed? While the Streams API offers a rich set of operations out of the box, it was always envisioned to offer the capability for user-defined intermediate operations, yet at that time the right way to expose that hadn't been discovered. Until now... In this session, we'll demonstrate Gatherers, an API made final through JEP 485 in Java 24, to create, use, re-use, and compose intermediate operations for java.util.stream.Stream, enabling custom transformations as natural steps in your day-to-day stream processing. Presented by Viktor Klang - Software Architect (Java Platform Group - Oracle) at JavaOne 2025 (CA, March 2025). All JavaOne 2025 talks ➀ https://www.youtube.com/playlist?list=PLX8CzqL3ArzVV1xRJkRbcM2tOgVwytJAi ➀ https://openjdk.org/jeps/485 ➀ https://inside.java ➀ https://dev.java ━━ Chapters ━━ β€’ 00:00 Intro β€’ 00:22 Java Stream Anatomy β€’ 02:03 Intermediate Stream Operation? β€’ 02:28 Growing an API β€’ 09:08 Evaluating Collector against the requirements β€’ 10:29 Stream Gatherers β€’ 12:37 Gatherers vs. Collectors β€’ 15:20 Example - Stream::map as a Gatherer β€’ 17:20 Example - Stream::mapMulti as a Gatherer β€’ 18:08 Example - Stream::limit as a Gatherer β€’ 21:21 Sequential vs. Parallel Evaluation β€’ 29:16 Some of the available java.util.stream.Gatherers β€’ 33:25 A note on composition β€’ 35:44 Conclusions β€’ 36:45 Q&A Tags: #Java #JavaOne #openjdk SES1641

You May Also Like

Elevate Your Streaming Setup

AI-recommended products based on this video

Loading...
Lenovo ThinkPad E14 Gen 5 Business Laptop (14" FHD+ Anti-glare, Intel 10-Core i7-1355U, 40GB RAM, 1TB SSD) Backlit, Fingerprint, Fast Charge, 1080p RGB Webcam, Wi-Fi 6, Win 11 Pro w/ Copilot

Lenovo ThinkPad E14 Gen 5 Business Laptop (14" FHD+ Anti-glare, Intel 10-Core i7-1355U, 40GB RAM, 1TB SSD) Backlit, Fingerprint, Fast Charge, 1080p RGB Webcam, Wi-Fi 6, Win 11 Pro w/ Copilot

(12)
$899.99
FREE delivery Wed, Jun 18
Loading...
Lenovo V-Series V15 Business Laptop | 15.6" FHD 1920 * 1080 | 13th Gen Intel Core i7-13620H | 40GB RAM | 1TB SSD | Webcam | Wi-Fi 6 | Windows 11 Pro | Black | Bundle with ADATA 512GB External SSD

Lenovo V-Series V15 Business Laptop | 15.6" FHD 1920 * 1080 | 13th Gen Intel Core i7-13620H | 40GB RAM | 1TB SSD | Webcam | Wi-Fi 6 | Windows 11 Pro | Black | Bundle with ADATA 512GB External SSD

(6)
$849.00
FREE delivery Jun 18 - 23
50+ bought in past month
Loading...
Lenovo V15 Laptop | 15.6" FHD Anti-Glare Display | AMD Ryzen 7 7730U | 40GB RAM | 1TB PCIe SSD | HDMI | Type-C | Webcam | Wi-Fi | THUNDEROBOT Wireless Ergonomic Mouse | Windows 11 Pro | Black

Lenovo V15 Laptop | 15.6" FHD Anti-Glare Display | AMD Ryzen 7 7730U | 40GB RAM | 1TB PCIe SSD | HDMI | Type-C | Webcam | Wi-Fi | THUNDEROBOT Wireless Ergonomic Mouse | Windows 11 Pro | Black

(26)
$649.00$636.02
FREE delivery Jun 18 - 23
Loading...
Lenovo ThinkBook 15 Gen 4 Business Laptop (15.6" FHD Anti-Glare, Intel 10-Core i7-1255U, 40GB RAM, 1TB PCIe SSD), 1080p Webcam, Narrow Bezel, Fingerprint, Wi-Fi 6, Ethernet, Win 11 Pro, Grey

Lenovo ThinkBook 15 Gen 4 Business Laptop (15.6" FHD Anti-Glare, Intel 10-Core i7-1255U, 40GB RAM, 1TB PCIe SSD), 1080p Webcam, Narrow Bezel, Fingerprint, Wi-Fi 6, Ethernet, Win 11 Pro, Grey

(30)
$759.98
FREE delivery Wed, Jun 18
50+ bought in past month
Loading...
ROVE R2-4K DUAL Dash Cam Front and Rear, STARVIS 2 Sensor, FREE 128GB Card Included, 5G WiFi - up to 20MB/s Fastest Download Speed with App, 4K 2160P/FHD Dash Camera for Cars, 3" IPS, 24H Parking Mode
Best Seller

ROVE R2-4K DUAL Dash Cam Front and Rear, STARVIS 2 Sensor, FREE 128GB Card Included, 5G WiFi - up to 20MB/s Fastest Download Speed with App, 4K 2160P/FHD Dash Camera for Cars, 3" IPS, 24H Parking Mode

(6,668)
$99.99$89.99
FREE delivery Sun, Sep 21
10K+ bought in past month
Loading...
REDTIGER Dash Cam Front Rear, 4K/2.5K Full HD Dash Camera for Cars, Included 32GB Card, Built-in Wi-Fi GPS, 3.16” IPS Screen, Night Vision, 170Β°Wide Angle, WDR, 24H Parking Mode(F7NP)

REDTIGER Dash Cam Front Rear, 4K/2.5K Full HD Dash Camera for Cars, Included 32GB Card, Built-in Wi-Fi GPS, 3.16” IPS Screen, Night Vision, 170Β°Wide Angle, WDR, 24H Parking Mode(F7NP)

(18,972)
$99.99
PrimeFREE delivery Sun, Sep 21
10K+ bought in past month
Loading...
beetles Gel Polish Christmas Gel Nail Polish Set 32 Winter Colors with Base Top Coat Burgundy Red Blue Purple Brown Orange Green Pink Black White Uv LED Lamp Nails Gifts for Women Fingertip Palette

beetles Gel Polish Christmas Gel Nail Polish Set 32 Winter Colors with Base Top Coat Burgundy Red Blue Purple Brown Orange Green Pink Black White Uv LED Lamp Nails Gifts for Women Fingertip Palette

(11,859)
$23.99
PrimeFREE delivery Sun, Dec 28 on $35 of items shipped by Amazon
20K+ bought in past month
Loading...
BISSELL Little Green Mini Portable Carpet and Upholstery Deep Cleaner, Car/Auto Detailer, with HydroRinse Self-Cleaning Tool and 4" Tough Stain Tool, Tea Green, 4075
Best Seller

BISSELL Little Green Mini Portable Carpet and Upholstery Deep Cleaner, Car/Auto Detailer, with HydroRinse Self-Cleaning Tool and 4" Tough Stain Tool, Tea Green, 4075

(2,451)
$78.75
FREE delivery Fri, Oct 17
100K+ bought in past month
Loading...
LIGHTAILING Light for Lego-75379 R2-D2 - Led Lighting Kit Compatible with Lego Building Blocks Model - NOT Included The Model Set

LIGHTAILING Light for Lego-75379 R2-D2 - Led Lighting Kit Compatible with Lego Building Blocks Model - NOT Included The Model Set

(27)
22.94
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35