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

Support remaining Guava collections #418

Closed
thespags opened this issue Feb 19, 2020 · 4 comments
Closed

Support remaining Guava collections #418

thespags opened this issue Feb 19, 2020 · 4 comments

Comments

@thespags
Copy link
Contributor

For Maps/Sets/Lists Freebuilder generates nicer builder semantics.

Have you consider similar ones for supporting things like BiMap, Multimap, and others from https://github.com/google/guava/wiki/NewCollectionTypesExplained?

Is this something feasible with detecting if these classes are being used and generate things such as putBiMap(key, value), putMultimap(key, value) or putMultimap(key, values...)`.

@alicederyn
Copy link
Collaborator

Multiset and multimap are already supported, if that is broken for you please do open up a separate issue.

Support for other types like BiMap are definitely possible. FreeBuilder is architected to allow customisation like this for any collection we'd like to add. PRs are welcome.

@alicederyn alicederyn changed the title Supporting Guava Collections For Better Generated Fluent Methods Support remaining Guava collections Feb 21, 2020
@thespags
Copy link
Contributor Author

thespags commented Feb 21, 2020

Awesome. I should have looked more closely for multiset and multimap I had hoped you would have done that already.

PRs are welcome.

Cool, I wanted your blessing before I gave it a whirl. Thanks

@alicederyn
Copy link
Collaborator

I'm going to mark this as closed with the merging of BiMap, because there are a lot of collections in Guava, and more are added over time, so this is a bit too open-ended. Please do open new issues for any specific collection that you'd like to add!

@thespags
Copy link
Contributor Author

thespags commented Apr 4, 2020

Sounds great. Thanks for the help @alicederyn. Multiset, Multimap, BiMap are the big ones, I'll be the first to let you know when I add one to a freebuilder pojo 😄

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

No branches or pull requests

2 participants