Class StreamGatherersPreviewNotes

java.lang.Object
net.jrodolfo.java_evolution.java22.StreamGatherersPreviewNotes

public class StreamGatherersPreviewNotes extends Object
Explains Stream Gatherers, introduced as a Java 22 preview feature.

Streams provide many built-in intermediate operations, but some useful transformations, such as windowing, scanning, or batching, historically did not fit cleanly into the stream pipeline. Gatherers were introduced to make custom intermediate operations expressible.

The Java 22 API was preview, so this repository documents the intent and keeps the runnable final example in the later Java 24 package.

  • Constructor Details

    • StreamGatherersPreviewNotes

      public StreamGatherersPreviewNotes()
  • Method Details

    • purpose

      public String purpose()
      Explains the central idea.
      Returns:
      a short explanation
    • exampleUseCase

      public String exampleUseCase()
      Gives common use cases.
      Returns:
      example transformations
    • projectDecision

      public String projectDecision()
      Explains why this Java 22 package keeps the feature as notes.
      Returns:
      the project decision