@Test public void testEquals() { EqualsTester equalsTester = new EqualsTester(); Boolean[] booleans = {null, true, false}; for (Boolean initial : booleans) { for (Boolean insert : booleans) { for (Boolean delete : booleans) { for (Boolean modify : booleans) { equalsTester.addEqualityGroup( new MonitorSelect(initial, insert, delete, modify), new MonitorSelect().setInitial(initial).setInsert(insert) .setDelete(delete).setModify(modify) ); } } } } equalsTester.testEquals(); }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof MonitorSelect)) { return false; } MonitorSelect that = (MonitorSelect) other; return Objects.equals(initial, that.getInitial()) && Objects.equals(insert, that.getInsert()) && Objects.equals(delete, that.getDelete()) && Objects.equals(modify, that.getModify()); }
MonitorSelect { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof MonitorSelect)) { return false; } MonitorSelect that = (MonitorSelect) other; return Objects.equals(initial, that.getInitial()) && Objects.equals(insert, that.getInsert()) && Objects.equals(delete, that.getDelete()) && Objects.equals(modify, that.getModify()); } }
MonitorSelect { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof MonitorSelect)) { return false; } MonitorSelect that = (MonitorSelect) other; return Objects.equals(initial, that.getInitial()) && Objects.equals(insert, that.getInsert()) && Objects.equals(delete, that.getDelete()) && Objects.equals(modify, that.getModify()); } MonitorSelect();  MonitorSelect(Boolean initial, Boolean insert, Boolean delete, Boolean modify); }
MonitorSelect { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof MonitorSelect)) { return false; } MonitorSelect that = (MonitorSelect) other; return Objects.equals(initial, that.getInitial()) && Objects.equals(insert, that.getInsert()) && Objects.equals(delete, that.getDelete()) && Objects.equals(modify, that.getModify()); } MonitorSelect();  MonitorSelect(Boolean initial, Boolean insert, Boolean delete, Boolean modify); Boolean getInitial(); MonitorSelect setInitial(Boolean initial); Boolean getInsert(); MonitorSelect setInsert(Boolean insert); Boolean getDelete(); MonitorSelect setDelete(Boolean delete); Boolean getModify(); MonitorSelect setModify(Boolean modify); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
MonitorSelect { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof MonitorSelect)) { return false; } MonitorSelect that = (MonitorSelect) other; return Objects.equals(initial, that.getInitial()) && Objects.equals(insert, that.getInsert()) && Objects.equals(delete, that.getDelete()) && Objects.equals(modify, that.getModify()); } MonitorSelect();  MonitorSelect(Boolean initial, Boolean insert, Boolean delete, Boolean modify); Boolean getInitial(); MonitorSelect setInitial(Boolean initial); Boolean getInsert(); MonitorSelect setInsert(Boolean insert); Boolean getDelete(); MonitorSelect setDelete(Boolean delete); Boolean getModify(); MonitorSelect setModify(Boolean modify); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }