MCPcopy Create free account
hub / github.com/agateau/pixelwheels / addRow

Method addRow

core/src/com/agateau/utils/CsvWriter.java:40–61  ·  view source on GitHub ↗
(Object... args)

Source from the content-addressed store, hash-verified

38 }
39
40 public void addRow(Object... args) {
41 try {
42 for (int i = 0, n = args.length; i < n; ++i) {
43 if (i > 0) {
44 mWriter.append(mFieldSeparator);
45 }
46 Object value = args[i];
47 String text;
48 if (value instanceof Float) {
49 text = String.format(Locale.US, "%f", (Float) value);
50 } else {
51 text = value.toString();
52 }
53 mWriter.append(text);
54 }
55 mWriter.append('\n');
56 mWriter.flush();
57 } catch (IOException e) {
58 NLog.e("Failed to write CSV file");
59 e.printStackTrace();
60 }
61 }
62}

Callers 4

createRaceRowMethod · 0.45
fillEntrantTableMethod · 0.45
updateRecordLabelMethod · 0.45

Calls 4

eMethod · 0.95
formatMethod · 0.80
toStringMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected