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