Close Menu
Şevket Ayaksız

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    Orb Offers Continuous Internet Performance Insights

    Mayıs 10, 2025

    MSI Claw Handhelds See 10% FPS Increase with Intel’s Latest Update

    Mayıs 10, 2025

    Save $300 on Acer Swift Go 14 with 16GB RAM

    Mayıs 10, 2025
    Facebook X (Twitter) Instagram
    • software
    • Gadgets
    Facebook X (Twitter) Instagram
    Şevket AyaksızŞevket Ayaksız
    Subscribe
    • Home
    • Technology

      Orb Offers Continuous Internet Performance Insights

      Mayıs 10, 2025

      MSI Claw Handhelds See 10% FPS Increase with Intel’s Latest Update

      Mayıs 10, 2025

      Ryzen 8000 HX Series Brings Affordable Power to Gaming Laptops

      Nisan 10, 2025

      Today only: Asus OLED laptop with 16GB RAM drops to $550

      Nisan 6, 2025

      Panther Lake: Intel’s Upcoming Hybrid Hero for PCs

      Nisan 5, 2025
    • Adobe
    • Microsoft
    • java
    • Oracle
    Şevket Ayaksız
    Anasayfa » Possible Java Streams Enhancement: Introduction of Lazy Mapping
    java

    Possible Java Streams Enhancement: Introduction of Lazy Mapping

    By mustafa efeTemmuz 4, 2024Yorum yapılmamış3 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Operations Set to Expand: OpenJDK Community’s Proposal for Enhanced Flexibility

    Java’s stream operations could soon see significant enhancements, making them more versatile and expressive, thanks to a proposal under consideration within the OpenJDK community.

    Recently authored and currently in a preview stage, the “stream gatherers” proposal aims to augment Java’s Stream API with support for custom intermediate operations. This enhancement would empower developers to manipulate stream pipelines in ways that aren’t easily achievable with the current set of built-in intermediate operations. Notably, the proposal emphasizes that its goal isn’t to modify the Java language itself to optimize stream processing or provide specialized compilation for Stream API usage.

    At the heart of the proposal is the introduction of Stream::gather(Gatherer), a new intermediate operation designed to process elements of a stream using a user-defined entity called a “gatherer.” This approach enables the creation of efficient and parallel-ready streams capable of implementing nearly any intermediate operation required. Since its inception in Java 8, released in March 2014, the Stream API (java.util.stream) has provided a mechanism for handling sequences of values lazily computed and potentially unbounded. It supports both sequential and parallel processing of streams, structured as a sequence of elements from a source, followed by any number of intermediate operations, culminating in a terminal operation.

    The current Stream API offers a fixed set of intermediate and terminal operations, including mapping, filtering, reduction, sorting, and more. While robust, this fixed set can sometimes limit the expressiveness of stream pipelines for complex tasks. The proposed gather operation seeks to address these limitations by enabling custom, user-defined operations within stream pipelines.

     

     

    Looking ahead, if accepted, stream gatherers could potentially debut in Java Development Kit (JDK) 22, currently under development and scheduled for release in March 2023. As of now, the preview of stream gatherers is not tied to any specific version of standard Java, but it represents a promising evolution in the capabilities of Java’s Stream API, promising greater flexibility and power to developers working with streams in Java applications.

    With the builder-style API, each intermediate operation returns a new stream; evaluation begins only when a terminal operation is invoked. The Stream API provides a reasonably rich, albeit fixed set of intermediate and terminal operations, including mapping, filtering, reduction, sorting, and others. An extensible terminal operation, Stream::collect, also is featured, enabling the output of a pipeline to be summarized in multiple ways. Use of streams in the Java ecosystem now is pervasive. However, the fixed set of intermediate operations means some complex tasks cannot easily be expressed as stream pipelines. Either a required intermediate task operation does not exist, or it exists but does not directly support the task.

    Intended for the standard edition of Java, the soonest stream gatherers could appear in a formal edition would be in Java Development Kit (JDK) 22, which is in development now and set to appear in March 2023. Currently, the stream gatherers preview is not targeted to any specific version of standard Java.

    Post Views: 122
    java Programming Languages Software Development
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    mustafa efe
    • Website

    Related Posts

    The Cot framework simplifies web development in Rust

    Nisan 29, 2025

    IBM Acquires DataStax to Enhance WatsonX’s Generative AI Strength

    Nisan 29, 2025

    Google Launches Free Version of Gemini Code Assist for Individual Developers

    Nisan 29, 2025
    Add A Comment

    Comments are closed.

    Editors Picks
    8.5

    Apple Planning Big Mac Redesign and Half-Sized Old Mac

    Ocak 5, 2021

    Autonomous Driving Startup Attracts Chinese Investor

    Ocak 5, 2021

    Onboard Cameras Allow Disabled Quadcopters to Fly

    Ocak 5, 2021
    Top Reviews
    9.1

    Review: T-Mobile Winning 5G Race Around the World

    By sevketayaksiz
    8.9

    Samsung Galaxy S21 Ultra Review: the New King of Android Phones

    By sevketayaksiz
    8.9

    Xiaomi Mi 10: New Variant with Snapdragon 870 Review

    By sevketayaksiz
    Advertisement
    Demo
    Şevket Ayaksız
    Facebook X (Twitter) Instagram YouTube
    • Home
    • Adobe
    • microsoft
    • java
    • Oracle
    • Contact
    © 2025 Theme Designed by Şevket Ayaksız.

    Type above and press Enter to search. Press Esc to cancel.