@Test public void testNoValues() { StringBuilder out = new StringBuilder(); formatter(out).done(); assertThat(out.toString()).isEmpty(); out = new StringBuilder("Hello World"); formatter(out).done(); assertThat(out.toString()).isEqualTo("Hello World"); }
public void done() { if (haveSeenValues) { out.append(suffix); } }
KeyValueFormatter implements KeyValueHandler { public void done() { if (haveSeenValues) { out.append(suffix); } } }
KeyValueFormatter implements KeyValueHandler { public void done() { if (haveSeenValues) { out.append(suffix); } } KeyValueFormatter(String prefix, String suffix, StringBuilder out); }
KeyValueFormatter implements KeyValueHandler { public void done() { if (haveSeenValues) { out.append(suffix); } } KeyValueFormatter(String prefix, String suffix, StringBuilder out); @Override void handle(String label, @NullableDecl Object value); void done(); }
KeyValueFormatter implements KeyValueHandler { public void done() { if (haveSeenValues) { out.append(suffix); } } KeyValueFormatter(String prefix, String suffix, StringBuilder out); @Override void handle(String label, @NullableDecl Object value); void done();  }