@Test public void equals() { assertEquality(new LinkEvent(new Attributes(), "#name", "text"), new LinkEvent(new Attributes(), "#name", "text")); assertInequality(new LinkEvent(new Attributes(), "#name", "text"), new LinkEvent(new Attributes(), "#name2", "text")); assertInequality(new LinkEvent(new Attributes(), "#name", "text"), new LinkEvent(new Attributes(), "#name", "text2")); }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!(obj instanceof LinkEvent)) { return false; } LinkEvent other = (LinkEvent) obj; return Objects.equals(hrefOrHashName, other.hrefOrHashName) && Objects.equals(text, other.text); }
LinkEvent extends DocumentBuilderEvent { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!(obj instanceof LinkEvent)) { return false; } LinkEvent other = (LinkEvent) obj; return Objects.equals(hrefOrHashName, other.hrefOrHashName) && Objects.equals(text, other.text); } }
LinkEvent extends DocumentBuilderEvent { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!(obj instanceof LinkEvent)) { return false; } LinkEvent other = (LinkEvent) obj; return Objects.equals(hrefOrHashName, other.hrefOrHashName) && Objects.equals(text, other.text); } LinkEvent(Attributes attributes, String hrefOrHashName, String text); }
LinkEvent extends DocumentBuilderEvent { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!(obj instanceof LinkEvent)) { return false; } LinkEvent other = (LinkEvent) obj; return Objects.equals(hrefOrHashName, other.hrefOrHashName) && Objects.equals(text, other.text); } LinkEvent(Attributes attributes, String hrefOrHashName, String text); @Override void invoke(DocumentBuilder builder); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
LinkEvent extends DocumentBuilderEvent { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!(obj instanceof LinkEvent)) { return false; } LinkEvent other = (LinkEvent) obj; return Objects.equals(hrefOrHashName, other.hrefOrHashName) && Objects.equals(text, other.text); } LinkEvent(Attributes attributes, String hrefOrHashName, String text); @Override void invoke(DocumentBuilder builder); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }