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

Make CompactHashMap and CompactLinkedHashMap public or add it to Maps utility class #6130

Open
Yuukiko85 opened this issue Aug 4, 2022 · 3 comments
Labels
P4 package=collect status=triaged type=other Miscellaneous activities not covered by other type= labels

Comments

@Yuukiko85
Copy link

Currently, you can't call the public CompactHashMap.create() or CompactHashMap.createWithInitialSize() methods (or the CompactLinkedHashMap variants) because the classes themselves are private.

In order to use the classes, I think they should either be made public, or the Maps utility class should be able to return instances of these.

Or maybe there is a way and I've just overlooked it.

@chaoren chaoren added package=collect status=triaged type=other Miscellaneous activities not covered by other type= labels P3 labels Aug 8, 2022
@chaoren
Copy link
Member

chaoren commented Aug 8, 2022

I think CompactHashMap only exists as implementation detail for Multimaps and wasn't meant to be used directly.

@Yuukiko85
Copy link
Author

The comments seem to imply it could be used directly if there is a use case for it.

@lowasser
Copy link
Contributor

lowasser commented Aug 9, 2022

It was a deliberate choice not to expose these for public use. It wasn't clear we wanted to get into the business of "alternate collection implementations for different performance goals, not different semantic goals e.g. Multimaps or immutable collections."

It may be appropriate to change that decision based on new data, but it was intentional.

@chaoren chaoren added P4 and removed P3 labels Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 package=collect status=triaged type=other Miscellaneous activities not covered by other type= labels
Projects
None yet
Development

No branches or pull requests

3 participants