Class StreamEnhancementExamples

java.lang.Object
net.jrodolfo.java_evolution.java09.StreamEnhancementExamples

public class StreamEnhancementExamples extends Object
Demonstrates Stream API enhancements introduced in Java 9.

Java 8 streams made pipeline-style data processing practical, but some common stream shapes still required custom logic: process ordered values until a boundary, skip ordered values until a boundary, safely stream a possibly null value, or generate values with a built-in stopping condition.

Java 9 added ordered stream slicing with takeWhile and dropWhile, nullable stream creation with Stream.ofNullable, and a bounded form of Stream.iterate.