<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Streams on Devops Monk</title><link>https://blog.devops-monk.com/tags/streams/</link><description>Recent content in Streams on Devops Monk</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 04 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.devops-monk.com/tags/streams/index.xml" rel="self" type="application/rss+xml"/><item><title>Advanced Streams: flatMap, Collectors, Grouping, and Partitioning</title><link>https://blog.devops-monk.com/tutorials/java8/streams-advanced/</link><pubDate>Mon, 04 May 2026 00:00:00 +0000</pubDate><guid>https://blog.devops-monk.com/tutorials/java8/streams-advanced/</guid><description>flatMap in Depth The Collectors API covers perhaps 90% of real-world aggregation needs, but the moment you need something beyond grouping, partitioning, or joining, the custom Collector is there. Understanding flatMap and the full Collectors toolkit — including when to write your own — separates competent Java 8 developers from those who still reach for a for loop whenever a problem gets slightly unusual.
flatMap is the most powerful transformation in the Streams API.</description></item><item><title>Java 8 Best Practices and Patterns for Production Code</title><link>https://blog.devops-monk.com/tutorials/java8/java8-best-practices/</link><pubDate>Mon, 04 May 2026 00:00:00 +0000</pubDate><guid>https://blog.devops-monk.com/tutorials/java8/java8-best-practices/</guid><description>Introduction Java 8 introduced a fundamentally different programming model. The features — lambdas, streams, Optional, CompletableFuture — interact with each other in ways that produce clean, readable code when used correctly and confusing, brittle code when used incorrectly. This article consolidates the most important production-ready guidance from across the series into a single reference, along with the migration checklist for moving a Java 7 codebase to Java 8.
Streams Best Practices Do: Use streams for transformations and aggregations // Good: filter → transform → collect List&amp;lt;String&amp;gt; premiumNames = customers.</description></item><item><title>Java 8 Overview: The Release That Changed Everything</title><link>https://blog.devops-monk.com/tutorials/java8/java8-overview/</link><pubDate>Mon, 04 May 2026 00:00:00 +0000</pubDate><guid>https://blog.devops-monk.com/tutorials/java8/java8-overview/</guid><description>Before We Start — Feel the Difference You&amp;rsquo;re about to learn Java 8. Before diving into history and theory, let&amp;rsquo;s just feel what changed. Here&amp;rsquo;s the same task written in Java 7 and Java 8:
Task: Find all names that start with &amp;ldquo;A&amp;rdquo;, uppercase them, sort them, and collect into a list.
// Java 7 — 10 lines, two passes, one temporary variable, zero joy List&amp;lt;String&amp;gt; result = new ArrayList&amp;lt;&amp;gt;(); for (String name : names) { if (name.</description></item><item><title>Streams API: Lazy Pipelines and the Functional Data Model</title><link>https://blog.devops-monk.com/tutorials/java8/streams-introduction/</link><pubDate>Mon, 04 May 2026 00:00:00 +0000</pubDate><guid>https://blog.devops-monk.com/tutorials/java8/streams-introduction/</guid><description>The Problem Streams Solve Java loops are not wrong — they are often the right tool. But when a computation is a multi-step pipeline of filter → transform → aggregate, a loop hides the structure of the computation in a tangle of temporary variables and mutated collections. The Streams API makes the structure explicit, lets the JVM optimise it, and composes naturally with lambdas and method references.
Consider filtering a list of orders to find the names of active premium customers who spent over $500, sorted alphabetically:</description></item></channel></rss>