Donald Raab
1 min readJun 3, 2024

--

Hi Istvan, thank you for the comments. The blog was intended to help developers learn to use Map sparingly as a return or parameter type in methods. The Collectors methods that return Map are just some examples in the JDK that I am aware of.

Note, I am the creator of the Eclipse Collections OSS library, which has its own partition method and supporting types along with a set of Collectors in a utility class called Collectors2 with a partition method that returns a PartitionMutableCollection.

https://eclipse.dev/collections/javadoc/11.1.0/org/eclipse/collections/impl/collector/Collectors2.html#partition(org.eclipse.collections.api.block.predicate.Predicate,java.util.function.Supplier)

I was previously a member representative on the JCP Executive Committee, and did suggest a JSR for a Collections 2.0 be created about 4 years ago. I've since abandoned the idea as something as core as a Collections framework needs to be part of the JDK (not a standalone JSR), and needs to be developed and supported by the OpenJDK Core team.

FWIW, here is a link to the proposal for a JSR for Collections 2.0, I presented four years ago at a JCP Executive Committee meeting. It's hosted on the JCP site.

https://jcp.org/aboutJava/communityprocess/ec-public/materials/2020-04-23/JCP_EC_2020_4_23_CollectionsJSR.pdf

I've blogged a bit previously why I have abandoned the JSR idea.

Hope this helps. Thanks!

--

--

Donald Raab
Donald Raab

Written by Donald Raab

Java Champion. Creator of the Eclipse Collections OSS Java library (https://github.com/eclipse/eclipse-collections). Inspired by Smalltalk. Opinions are my own.

Responses (1)