MCPcopy
hub / github.com/bazelbuild/bazel / printList

Method printList

src/main/java/net/starlark/java/eval/Printer.java:95–104  ·  view source on GitHub ↗

Appends a list to the printer's buffer. List elements are rendered with repr. May be overridden by subclasses. @param list the list of objects to repr (each as with repr) @param before a string to print before the list items, e.g. an opening bracket @param separator a separator to print

(Iterable<?> list, String before, String separator, String after)

Source from the content-addressed store, hash-verified

93 * @param after a string to print after the list items, e.g. a closing bracket
94 */
95 public Printer printList(Iterable<?> list, String before, String separator, String after) {
96 this.append(before);
97 String sep = "";
98 for (Object elem : list) {
99 this.append(sep);
100 sep = separator;
101 this.repr(elem);
102 }
103 return this.append(after);
104 }
105
106 @Override
107 public final String toString() {

Callers 4

reprMethod · 0.95
reprMethod · 0.80
reprMethod · 0.80
reprMethod · 0.80

Calls 2

appendMethod · 0.95
reprMethod · 0.95

Tested by

no test coverage detected