Returns a string constructed by joining the string representations of the iterated objects (in order), with the delimiter inserted between them. @param delim the delimiter that is inserted between the joined strings @param items the items whose string representations are joined @param the item
(String delim, Iterable<T> items)
| 2556 | * @return the joined string |
| 2557 | */ |
| 2558 | public static <T> String join(String delim, Iterable<T> items) { |
| 2559 | StringBuilder sb = new StringBuilder(); |
| 2560 | for (Iterator<T> it = items.iterator(); it.hasNext(); ) |
| 2561 | sb.append(it.next()).append(it.hasNext() ? delim : ""); |
| 2562 | return sb.toString(); |
| 2563 | } |
| 2564 | |
| 2565 | /** |
| 2566 | * Returns the parent of the given path. |
no test coverage detected