@Test public void testDatasetToString() { assertEquals("(override1) value3, value2", sender.getDisplayString()); sender.overridenValues = Collections.emptyMap(); Map<String, String> ds = new HashMap<>(); ds.put("Rolle", null); ds.put("Vorname", null); ds.put("Nachname", null); sender.dataset = new MockDataset("", ds); assertEquals(", ", sender.getDisplayString()); sender.dataset = new MockDataset("", Map.of("Rolle", "", "Vorname", "", "Nachname", "")); assertEquals(", ", sender.getDisplayString()); }
public String getDisplayString() { StringBuilder stringBuilder = new StringBuilder(); String rolle = get(ROLLE); String nachname = get(NACHNAME); String vorname = get(VORNAME); stringBuilder.append(rolle == null || rolle.isEmpty() ? "" : "(" + rolle + ") "); stringBuilder.append(nachname == null || nachname.isEmpty() ? "" : nachname); stringBuilder.append(", "); stringBuilder.append(vorname == null || vorname.isEmpty() ? "" : vorname); return stringBuilder.toString(); }
Sender { public String getDisplayString() { StringBuilder stringBuilder = new StringBuilder(); String rolle = get(ROLLE); String nachname = get(NACHNAME); String vorname = get(VORNAME); stringBuilder.append(rolle == null || rolle.isEmpty() ? "" : "(" + rolle + ") "); stringBuilder.append(nachname == null || nachname.isEmpty() ? "" : nachname); stringBuilder.append(", "); stringBuilder.append(vorname == null || vorname.isEmpty() ? "" : vorname); return stringBuilder.toString(); } }
Sender { public String getDisplayString() { StringBuilder stringBuilder = new StringBuilder(); String rolle = get(ROLLE); String nachname = get(NACHNAME); String vorname = get(VORNAME); stringBuilder.append(rolle == null || rolle.isEmpty() ? "" : "(" + rolle + ") "); stringBuilder.append(nachname == null || nachname.isEmpty() ? "" : nachname); stringBuilder.append(", "); stringBuilder.append(vorname == null || vorname.isEmpty() ? "" : vorname); return stringBuilder.toString(); } Sender(Dataset dataset);  Sender(Map<String, String> dsoverride);  Sender(String key, Dataset dataset, Map<String, String> dsoverride);  Sender(Sender copy); }
Sender { public String getDisplayString() { StringBuilder stringBuilder = new StringBuilder(); String rolle = get(ROLLE); String nachname = get(NACHNAME); String vorname = get(VORNAME); stringBuilder.append(rolle == null || rolle.isEmpty() ? "" : "(" + rolle + ") "); stringBuilder.append(nachname == null || nachname.isEmpty() ? "" : nachname); stringBuilder.append(", "); stringBuilder.append(vorname == null || vorname.isEmpty() ? "" : vorname); return stringBuilder.toString(); } Sender(Dataset dataset);  Sender(Map<String, String> dsoverride);  Sender(String key, Dataset dataset, Map<String, String> dsoverride);  Sender(Sender copy); String getKey(); Dataset getDataset(); Map<String, String> getOverridenValues(); boolean isSelected(); void setSelected(boolean selected); String get(String columnName); String getFromDatabase(String columnName); void overrideValue(String columnName, String newValue); boolean isFromDatabase(); String getDisplayString(); void drop(String columnName); boolean isOverriden(); static Comparator<Sender> comparatorByColumn(String column); @Override int hashCode(); @Override boolean equals(Object obj); }
Sender { public String getDisplayString() { StringBuilder stringBuilder = new StringBuilder(); String rolle = get(ROLLE); String nachname = get(NACHNAME); String vorname = get(VORNAME); stringBuilder.append(rolle == null || rolle.isEmpty() ? "" : "(" + rolle + ") "); stringBuilder.append(nachname == null || nachname.isEmpty() ? "" : nachname); stringBuilder.append(", "); stringBuilder.append(vorname == null || vorname.isEmpty() ? "" : vorname); return stringBuilder.toString(); } Sender(Dataset dataset);  Sender(Map<String, String> dsoverride);  Sender(String key, Dataset dataset, Map<String, String> dsoverride);  Sender(Sender copy); String getKey(); Dataset getDataset(); Map<String, String> getOverridenValues(); boolean isSelected(); void setSelected(boolean selected); String get(String columnName); String getFromDatabase(String columnName); void overrideValue(String columnName, String newValue); boolean isFromDatabase(); String getDisplayString(); void drop(String columnName); boolean isOverriden(); static Comparator<Sender> comparatorByColumn(String column); @Override int hashCode(); @Override boolean equals(Object obj); static final String NACHNAME; static final String VORNAME; static final String ROLLE; }