Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass appropriate java.util.stream.Collector.Characteristics to Collector API #209

Open
lukaseder opened this issue Mar 13, 2016 · 2 comments

Comments

@lukaseder
Copy link
Member

java.util.stream.Stream can implement some optimisations if custom Collectors pass hints to the collect() API via java.util.stream.Collector.Characteristics. We should also pass these characteristics.

@amaembo
Copy link

amaembo commented Mar 13, 2016

As you mostly ignore parallel streams, the only useful characteristic in your case is IDENTITY_FINISH which is automatically injected if you are using Collector.of without providing the finisher.

@lukaseder
Copy link
Member Author

Thanks for the feedback, @amaembo. Within jOOλ, that's certainly true, but people might use the collectors exposed in Agg also for parallel JDK streams, or for StreamEx...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants