MCPcopy Create free account
hub / github.com/antlr/codebuff / toString

Method toString

corpus/java/training/guava/collect/Iterators.java:294–299  ·  view source on GitHub ↗

Returns a string representation of iterator, with the format [e1, e2, ..., en]. The iterator will be left exhausted: its hasNext() method will return false.

(Iterator<?> iterator)

Source from the content-addressed store, hash-verified

292 * {@code hasNext()} method will return {@code false}.
293 */
294 public static String toString(Iterator<?> iterator) {
295 return Collections2.STANDARD_JOINER
296 .appendTo(new StringBuilder().append('['), iterator)
297 .append(']')
298 .toString();
299 }
300
301 /**
302 * Returns the single element contained in {@code iterator}.

Callers 1

toStringMethod · 0.95

Calls 3

toStringMethod · 0.65
appendMethod · 0.45
appendToMethod · 0.45

Tested by

no test coverage detected