Here you can find the source of mapToString(Map
Parameter | Description |
---|---|
map | the map to convert |
public static String mapToString(Map<String, String> map)
//package com.java2s; import java.util.Map; public class Main { /**//w ww . ja v a 2 s.c o m * Convert a map to a string of key/val pairs of the form key1=val1, separated by semicolons. * * @param map the map to convert * @return the string */ public static String mapToString(Map<String, String> map) { String ret = ""; for (String key : map.keySet()) { ret += key + "=" + map.get(key) + "; "; } return ret; } }