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

Method toStringImpl

output/java_guava/1.4.17/Collections2.java:299–308  ·  view source on GitHub ↗

An implementation of Collection#toString().

(final Collection<?> collection)

Source from the content-addressed store, hash-verified

297 */
298
299 static String toStringImpl(final Collection<?> collection) {
300 StringBuilder sb = newStringBuilderForCollection(collection.size()).append('[');
301 STANDARD_JOINER.appendTo(sb, Iterables.transform(collection, new Function<Object, Object>() {
302 @Override
303 public Object apply(Object input) {
304 return input == collection ? "(this Collection)" : input;
305 }
306 }));
307 return sb.append(']').toString();
308 }
309
310 /**
311 * Returns best-effort-sized StringBuilder based on the given collection size.

Callers 1

standardToStringMethod · 0.95

Calls 6

transformMethod · 0.95
sizeMethod · 0.65
toStringMethod · 0.65
appendMethod · 0.45
appendToMethod · 0.45

Tested by

no test coverage detected