public static Map < String , String > getAsMap ( String csvPairs ) { Map < String , String > map = new HashMap < String , String > ( ) ; String [ ] pairs = csvPairs . split ( "," ) ; for ( String pair : pairs ) { String [ ] split = pair . split ( "=" ) ; map . put ( split [ 0 ] , split [ 1 ] ) ; } return map ; }
Parses a CSV row containing name = value pairs .