List of utility methods to do Iterator Join
String | join(Iterator iterator, String s) join StringBuffer stringbuffer = new StringBuffer(); do { if (!iterator.hasNext()) break; stringbuffer.append(iterator.next()); if (iterator.hasNext()) stringbuffer.append(s); } while (true); ... |
String | join(Iterator iterator, String separator) Joins the elements of the provided if (separator == null) { separator = ""; StringBuffer buf = new StringBuffer(256); while (iterator.hasNext()) { buf.append(iterator.next()); if (iterator.hasNext()) { buf.append(separator); ... |
String | join(Iterator iterator, String separator) join if (iterator == null) { return null; if (!iterator.hasNext()) { return EMPTY; Object first = iterator.next(); if (!iterator.hasNext()) { ... |
String | join(Iterator objects, String separator) join StringBuffer buf = new StringBuffer(); if (objects.hasNext()) buf.append(objects.next()); while (objects.hasNext()) { buf.append(separator).append(objects.next()); return buf.toString(); |
String | join(Iterator> iterator, String separator) Joins a iteratable list of objects by the given separator if (iterator == null) return ""; Object first = iterator.next(); if (!iterator.hasNext()) return first.toString(); StringBuilder buf = new StringBuilder(); if (first != null) { buf.append(first); ... |
String | join(Iterator join StringBuilder builder = new StringBuilder(); while (iterator.hasNext()) { builder.append(iterator.next()); if (iterator.hasNext()) { builder.append(", "); return builder.toString(); ... |
String | join(String delimiter, Iterator> iterator) join if (delimiter == null) { delimiter = EMPTY_STRING; if (!iterator.hasNext()) { return EMPTY_STRING; Object first = iterator.next(); if (!iterator.hasNext()) { ... |
String | join(String seperator, Iterator objects) join StringBuffer buf = new StringBuffer(); if (objects.hasNext()) buf.append(objects.next()); while (objects.hasNext()) { buf.append(seperator).append(objects.next()); return buf.toString(); |
String | join(String seperator, Iterator objects) join StringBuffer sb = new StringBuffer(); if (objects.hasNext()) sb.append(objects.next()); while (objects.hasNext()) { sb.append(seperator).append(objects.next()); return sb.toString(); |
Iterator | joinIterators(final Iterator join Iterators return new Iterator<T>() { private int next = 0; @Override public boolean hasNext() { while (next < iterators.length && !iterators[next].hasNext()) { next++; return next < iterators.length; ... |