Close Menu
Şevket Ayaksız

    Subscribe to Updates

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

    What's Hot

    Microsoft offers free AI video tool in Bing app

    Haziran 4, 2025

    Intel’s Bartlett Lake and Wildcat Lake CPUs leak online

    Haziran 4, 2025

    Sony PS5 DualSense controller now $54.99

    Haziran 4, 2025
    Facebook X (Twitter) Instagram
    • software
    • Gadgets
    Facebook X (Twitter) Instagram
    Şevket AyaksızŞevket Ayaksız
    Subscribe
    • Home
    • Technology

      Intel’s Bartlett Lake and Wildcat Lake CPUs leak online

      Haziran 4, 2025

      MSI revives Cyclone design for new RTX 5060

      Haziran 4, 2025

      Unlock Desktop GPU Power with Asus ROG XG Station 3

      Mayıs 27, 2025

      OpenSilver Expands Cross-Platform Reach with iOS and Android Support

      Mayıs 27, 2025

      Introducing AMD’s 96-Core Threadripper 9000 CPUs: A New Era in Computing

      Mayıs 22, 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: 135
    java Programming Languages Software Development
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    mustafa efe
    • Website

    Related Posts

    Deno’s Latest Update Adds OpenTelemetry Support

    Mayıs 31, 2025

    Empowering Firebase Studio with Agentic AI for Smarter App Development

    Mayıs 27, 2025

    Google I/O 2025 Puts Spotlight on AI Breakthroughs and Gemini Advancements

    Mayıs 27, 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.