Try addRepeated...Builder() and then getRepeatedFieldBuilder():
On Friday, February 19, 2016 at 3:57:10 PM UTC-8, Diana Contreras wrote:
> Is there a chance that there is a method like setRepeatedFieldBuilder? Im
> using setRepeatedField on a builder by doing:
> builder.setRepeatedField(field, i, builderToSet.buildPartial());
> But I'm having trouble with references due to the fact that when I try to
> retrieve the builders set:
> Builder b = builder.getRepeatedFieldBuilder(field, i)
> the builder "b" is a different object than the builder I originally set,
> because by doing the buildPartial on the "set" the builder is converted to
> an inmutable message, and by doing getRepeatedFieldBuilder a new
> builder(different reference id) is returned.
> So if a reference to that builder already existed, it won't be updated
> because now we are talking about a new builder with the same info. Any help?
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.