Make a string from the contents of this JSONArray. The separator string is inserted between each element. Warning: This method assumes that the data structure is acyclic. @param separator A string that will be inserted between the elements. @return a string. @throws RuntimeException If
(String separator)
| 1246 | * @throws RuntimeException If the array contains an invalid number. |
| 1247 | */ |
| 1248 | public String join(String separator) { |
| 1249 | int len = this.size(); |
| 1250 | StringBuilder sb = new StringBuilder(); |
| 1251 | |
| 1252 | for (int i = 0; i < len; i += 1) { |
| 1253 | if (i > 0) { |
| 1254 | sb.append(separator); |
| 1255 | } |
| 1256 | sb.append(JSONObject.valueToString(this.myArrayList.get(i))); |
| 1257 | } |
| 1258 | return sb.toString(); |
| 1259 | } |
| 1260 | } |
nothing calls this directly
no test coverage detected