@Test public void testStrList3(){ List<String> strList = new ArrayList<String>(); strList.add("1"); strList.add("2"); strList.add("3"); assertEquals("1, 2, 3",StringConverter.commaSeperatedStringList(strList)); }
public static String commaSeperatedStringList(List<String> strList) { StringBuilder sb = new StringBuilder(SB_INIT_SIZE); int i; for (i = 0; i < strList.size(); i++) { sb.append(strList.get(i)); if (i < strList.size() - 1) { sb.append(", "); } } return sb.toString(); }
StringConverter { public static String commaSeperatedStringList(List<String> strList) { StringBuilder sb = new StringBuilder(SB_INIT_SIZE); int i; for (i = 0; i < strList.size(); i++) { sb.append(strList.get(i)); if (i < strList.size() - 1) { sb.append(", "); } } return sb.toString(); } }
StringConverter { public static String commaSeperatedStringList(List<String> strList) { StringBuilder sb = new StringBuilder(SB_INIT_SIZE); int i; for (i = 0; i < strList.size(); i++) { sb.append(strList.get(i)); if (i < strList.size() - 1) { sb.append(", "); } } return sb.toString(); }  }
StringConverter { public static String commaSeperatedStringList(List<String> strList) { StringBuilder sb = new StringBuilder(SB_INIT_SIZE); int i; for (i = 0; i < strList.size(); i++) { sb.append(strList.get(i)); if (i < strList.size() - 1) { sb.append(", "); } } return sb.toString(); }  static String commaSeperatedStringList(List<String> strList); static String getExtendedStackTrace(Throwable ti); static String getStackTrace(Exception ex); static String integersAsString(Collection<Integer> ids); static String integersAsString(List<Integer> ids); }
StringConverter { public static String commaSeperatedStringList(List<String> strList) { StringBuilder sb = new StringBuilder(SB_INIT_SIZE); int i; for (i = 0; i < strList.size(); i++) { sb.append(strList.get(i)); if (i < strList.size() - 1) { sb.append(", "); } } return sb.toString(); }  static String commaSeperatedStringList(List<String> strList); static String getExtendedStackTrace(Throwable ti); static String getStackTrace(Exception ex); static String integersAsString(Collection<Integer> ids); static String integersAsString(List<Integer> ids);  }