@Test public void testEquals() { new EqualsTester() .addEqualityGroup(event1) .addEqualityGroup(event2, sameAsEvent2) .addEqualityGroup(event3) .addEqualityGroup(event4) .testEquals(); }
@Override public boolean equals(Object o) { if (!(o instanceof SetEvent)) { return false; } SetEvent that = (SetEvent) o; return Objects.equals(this.name, that.name) && Objects.equals(this.type, that.type) && Objects.equals(this.entry, that.entry); }
SetEvent { @Override public boolean equals(Object o) { if (!(o instanceof SetEvent)) { return false; } SetEvent that = (SetEvent) o; return Objects.equals(this.name, that.name) && Objects.equals(this.type, that.type) && Objects.equals(this.entry, that.entry); } }
SetEvent { @Override public boolean equals(Object o) { if (!(o instanceof SetEvent)) { return false; } SetEvent that = (SetEvent) o; return Objects.equals(this.name, that.name) && Objects.equals(this.type, that.type) && Objects.equals(this.entry, that.entry); } SetEvent(String name, Type type, E entry); }
SetEvent { @Override public boolean equals(Object o) { if (!(o instanceof SetEvent)) { return false; } SetEvent that = (SetEvent) o; return Objects.equals(this.name, that.name) && Objects.equals(this.type, that.type) && Objects.equals(this.entry, that.entry); } SetEvent(String name, Type type, E entry); String name(); Type type(); E entry(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
SetEvent { @Override public boolean equals(Object o) { if (!(o instanceof SetEvent)) { return false; } SetEvent that = (SetEvent) o; return Objects.equals(this.name, that.name) && Objects.equals(this.type, that.type) && Objects.equals(this.entry, that.entry); } SetEvent(String name, Type type, E entry); String name(); Type type(); E entry(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }