Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants