将映射键设置为逗号字符串
/** 来 自 NowJava.com - 时 代 Java **/ //package com.nowjava; import java.util.Iterator; import java.util.Map; import java.util.Set; public class Main { public static String setKeysToCommaString(Set s) { StringBuffer sb = new StringBuffer(); Iterator i = s.iterator(); while (i.hasNext()) { Map.Entry o = (Map.Entry) i.next();/** 时 代 J a v a - N o w J a v a . c o m 提 供 **/ sb.append((String) o.getKey()); if (i.hasNext())