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

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -