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)
| 1336 | * @throws RuntimeException If the array contains an invalid number. |
| 1337 | */ |
| 1338 | public String join(String separator) { |
| 1339 | int len = this.size(); |
| 1340 | StringBuilder sb = new StringBuilder(); |
| 1341 | |
| 1342 | for (int i = 0; i < len; i += 1) { |
| 1343 | if (i > 0) { |
| 1344 | sb.append(separator); |
| 1345 | } |
| 1346 | sb.append(JSONObject.valueToString(this.myArrayList.get(i))); |
| 1347 | } |
| 1348 | return sb.toString(); |
| 1349 | } |
| 1350 | } |
nothing calls this directly
no test coverage detected