You have to construct the map yourself by iterating once through the entries. There have been some vague ideas thrown around regarding built-in map support but not much agreement on what it should look like or whether it is really needed...
On Mon, Mar 23, 2009 at 11:23 PM, murthy <venkateshamurth...@gmail.com>wrote: > > Hi > > My requirement is to be able serialize and deserialize a Map<String, > Double> which is map String key and double value pairs. > > So when i try doing the following structure > > message Entry { > required string key = 1; > required float value = 2; > } > // Our address book file is just one of these. > message StatsMsg { > required int32 enc = 1; > repeated Entry entry = 2 > } > > The Java class generated gives a list which is inefficient in > accessing keys [O(N)]. I would rather want a map equvivalent to be > generated for the same. > > How do i do it. > > thanks > murthy > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~----------~----~----~----~------~----~------~--~---