-
Notifications
You must be signed in to change notification settings - Fork 52
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
BuiltMap<String, BuiltSet<String>> updates #91
Comments
Ignoring the general problem -- shouldn't you be using a BuiltSetMultimap here? |
Oh haha, yes, of course :D I feel like I might have contributed to the original implementation. Not sure what to do about the operator [] though. I have run into this a couple more times. Usually I just end up setting the builder but access the built object. This is not optimal because I need to build it on every iteration to avoid staleness.. Maybe I should just use List etc within algorithms that calculate things. Somehow I like to stay within the Built* API though. |
Yeah, it probably does make sense to add []. |
I've also looked at special built collections that know they contain buildable values -- I think it's workable, but needing a new class name and needing more generics is a bit horrible. Also you need to supply a builder factory:
Not sure it's worth it. |
Actually built list of built value classes is very common case. I would like to have that bridge between those two libraries. |
Yes, I've been trying to think of a way to do that #83 |
How do I add an element to a contained BuiltSet?
MapBuilder does not allow me to retrieve elements and update them. Why is there no operator []?
Ideally, there was special casing for keys and values of BuiltMap such that toBuilder returned MapBuilder<String, ListBuilder> in this case.
What's a good workaround?
Right now, I've only been able to come up with:
Thanks,
Andreas
The text was updated successfully, but these errors were encountered: