java - How to transform MultiMap<String, String> to MultiMap<String,Integer>? -
i got following multimap
, how transform multimap<string,integer>
?
multimap<string, string> multimap= // contents here
use multimaps#transformvalues(multimap, function)
:
multimap<string, integer> transformed = multimaps.transformvalues(multimap, new function<string, integer>() { @override public integer apply(string value) { return integer.valueof(value); } });
see also:
Comments
Post a Comment