@Test public void equals() { assertEquality(new EntityReferenceEvent("ent"), new EntityReferenceEvent("ent")); assertInequality(new EntityReferenceEvent("ent"), new EntityReferenceEvent("amp")); }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!(obj instanceof EntityReferenceEvent)) { return false; } return Objects.equals(entity, ((EntityReferenceEvent) obj).entity); }
EntityReferenceEvent extends DocumentBuilderEvent { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!(obj instanceof EntityReferenceEvent)) { return false; } return Objects.equals(entity, ((EntityReferenceEvent) obj).entity); } }
EntityReferenceEvent extends DocumentBuilderEvent { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!(obj instanceof EntityReferenceEvent)) { return false; } return Objects.equals(entity, ((EntityReferenceEvent) obj).entity); } EntityReferenceEvent(String entity); }
EntityReferenceEvent extends DocumentBuilderEvent { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!(obj instanceof EntityReferenceEvent)) { return false; } return Objects.equals(entity, ((EntityReferenceEvent) obj).entity); } EntityReferenceEvent(String entity); @Override void invoke(DocumentBuilder builder); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
EntityReferenceEvent extends DocumentBuilderEvent { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!(obj instanceof EntityReferenceEvent)) { return false; } return Objects.equals(entity, ((EntityReferenceEvent) obj).entity); } EntityReferenceEvent(String entity); @Override void invoke(DocumentBuilder builder); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }