---
title: "Discussion on \"A real-world example of a Stream Collector\" | Hashnode"
description: "Discussion on \"A real-world example of a Stream Collector\". Java Stream's Collectors methods fit most use-cases. They allow returning either a Collection or a scalar. For the former, you use one of the toXXX() method, for the latter, one of the reducing() one.\nLet's imagine an e-commerce platform that impleme..."
url: "https://hashnode.com/posts/real-world-stream-collector/608ed747dc886b43180068f5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [A real-world example of a Stream Collector](https://frankel.hashnode.dev/real-world-stream-collector?utm_source=hashnode&utm_medium=feed)

Java Stream's Collectors methods fit most use-cases. They allow returning either a Collection or a scalar. For the former, you use one of the toXXX() method, for the latter, one of the reducing() one. Let's imagine an e-commerce platform that impleme...

May 2, 2021 · 5 min read · frankel.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#apis](https://hashnode.com/tag/apis)
-   [#functional-programming](https://hashnode.com/tag/functional-programming)

## Written by

[Nicolas Fränkel](https://hashnode.com/@nfrankel)

@nfrankel · Geneva

  
[View profile](https://hashnode.com/@nfrankel)

Developer Advocate

Technologist focusing on cloud-native technologies, DevOps, CI/CD pipelines, and system observability. His focus revolves around creating technical content, delivering talks, and engaging with developer communities to promote the adoption of modern software practices. With a strong background in software, he has worked extensively with the JVM, applying his expertise across various industries. In addition to his technical work, he is the author of several books and regularly shares insights through his blog and open-source contributions.

## Responses 2

Markdown supported · ⌘↵ to post

[handsom david](https://hashnode.com/@Oliver44)

[Mar 15, 2023](https://hashnode.com/posts/real-world-stream-collector/608ed747dc886b43180068f5/comment/6411800f23ae346d7604134e)

[foe](http://foo.bar/) \[url=googl.com\]Google\[/url\] <a href="abc.com">abc</a> [google.com](https://www.google.com/) \[site->[riseup.net](http://riseup.net/)\]

[handsom david](https://hashnode.com/@Oliver44)

[Mar 14, 2023](https://hashnode.com/posts/real-world-stream-collector/608ed747dc886b43180068f5/comment/640fe15da5481161048c4a57)

Storing your RV in a climate-controlled area, such as a garage or RV storage facility, is important to maintain its condition. [RV](https://rvneedthis.com/best-lithium-battery-for-rv/)
