@Test public void testEquals() { assertTrue(sender.equals(sender)); assertFalse(sender.equals(null)); assertFalse(sender.equals(new Object())); Sender copy = new Sender(sender); assertTrue(sender.equals(copy)); copy.selected = true; assertFalse(sender.equals(copy)); copy.overridenValues = null; assertFalse(sender.equals(copy)); copy.key = null; assertFalse(sender.equals(copy)); copy.dataset = null; assertFalse(sender.equals(copy)); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Sender other = (Sender) obj; return Objects.equals(dataset, other.dataset) && Objects.equals(key, other.key) && Objects.equals(overridenValues, other.overridenValues) && selected == other.selected; }
Sender { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Sender other = (Sender) obj; return Objects.equals(dataset, other.dataset) && Objects.equals(key, other.key) && Objects.equals(overridenValues, other.overridenValues) && selected == other.selected; } }
Sender { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Sender other = (Sender) obj; return Objects.equals(dataset, other.dataset) && Objects.equals(key, other.key) && Objects.equals(overridenValues, other.overridenValues) && selected == other.selected; } Sender(Dataset dataset);  Sender(Map<String, String> dsoverride);  Sender(String key, Dataset dataset, Map<String, String> dsoverride);  Sender(Sender copy); }
Sender { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Sender other = (Sender) obj; return Objects.equals(dataset, other.dataset) && Objects.equals(key, other.key) && Objects.equals(overridenValues, other.overridenValues) && selected == other.selected; } 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 { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Sender other = (Sender) obj; return Objects.equals(dataset, other.dataset) && Objects.equals(key, other.key) && Objects.equals(overridenValues, other.overridenValues) && selected == other.selected; } 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; }