_Original issue created by SeanPFloyd on 2012-05-16 at 04:34 PM_
The use case I have in mind is parsing HTTP query Strings.
I am using this e.g. in log file analysis tools like this:
Map<String, String> queryParameters =
Splitter.on('&').withKeyValueSeparator('=').split(queryString);
However, HTTP Requests can have multiple values to the same key, so it would be even nicer to have something like this:
Multimap<String, String> queryParameters =
Splitter.on('&').someMethodNameHere('=').split(queryString);
(And since there are many different types of multimaps, there should probably also be an overloaded version that takes a Supplier<Multimap<String, String>>)
_Original comment posted by wasserman.louis on 2012-05-16 at 06:33 PM_
We couldn't do this if we wanted to, because it would require common.base to depend on common.collect.
Status: WontFix
_Original comment posted by wasserman.louis on 2012-05-18 at 10:54 PM_
No, it's Google's internal build system.
+1
Regardless, it could produce an iterable of Map.Entrys, which could then be turned into a multimap.
+1
+1
+1
+1
I believe we recently approved (but haven't implemented) Splitter.splitToStream. Maybe we should add MapSplitter.splitToStream, as well. That type would also be a candidate for returning a BiStream/MapStream/etc. type, should we ever provide or adopt one of those. (But the new stream type couldn't go in common.collect, as noted above.)
Most helpful comment
Regardless, it could produce an iterable of Map.Entrys, which could then be turned into a multimap.