@Test public void testXWikiLinkEquals() { final long docId = 101; final String link = "test link"; final String fullName = "test fullName"; XWikiLink l1 = new XWikiLink(docId, link, fullName); XWikiLink l2 = new XWikiLink(docId, link, fullName); XWikiLink l3 = new XWikiLink(docId, link, fullName); assertEquals(l1, l1); assertEquals(l1, l2); assertEquals(l2, l1); assertEquals(l1, l2); assertEquals(l2, l3); assertEquals(l1, l3); assertFalse(l1.equals(null)); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof XWikiLink)) { return false; } XWikiLink o = (XWikiLink)obj; EqualsBuilder builder = new EqualsBuilder(); builder.append(getDocId(), o.getDocId()); builder.append(getLink(), o.getLink()); builder.append(getFullName(), o.getFullName()); return builder.isEquals(); }
XWikiLink implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof XWikiLink)) { return false; } XWikiLink o = (XWikiLink)obj; EqualsBuilder builder = new EqualsBuilder(); builder.append(getDocId(), o.getDocId()); builder.append(getLink(), o.getLink()); builder.append(getFullName(), o.getFullName()); return builder.isEquals(); } }
XWikiLink implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof XWikiLink)) { return false; } XWikiLink o = (XWikiLink)obj; EqualsBuilder builder = new EqualsBuilder(); builder.append(getDocId(), o.getDocId()); builder.append(getLink(), o.getLink()); builder.append(getFullName(), o.getFullName()); return builder.isEquals(); } XWikiLink();  XWikiLink(long docId);  XWikiLink(long docId, String link, String fullName); }
XWikiLink implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof XWikiLink)) { return false; } XWikiLink o = (XWikiLink)obj; EqualsBuilder builder = new EqualsBuilder(); builder.append(getDocId(), o.getDocId()); builder.append(getLink(), o.getLink()); builder.append(getFullName(), o.getFullName()); return builder.isEquals(); } XWikiLink();  XWikiLink(long docId);  XWikiLink(long docId, String link, String fullName); long getDocId(); void setDocId(long docId); void setLink(String link); String getLink(); String getFullName(); void setFullName(String fullName); @Override boolean equals(Object obj); @Override int hashCode(); String toString(); }
XWikiLink implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof XWikiLink)) { return false; } XWikiLink o = (XWikiLink)obj; EqualsBuilder builder = new EqualsBuilder(); builder.append(getDocId(), o.getDocId()); builder.append(getLink(), o.getLink()); builder.append(getFullName(), o.getFullName()); return builder.isEquals(); } XWikiLink();  XWikiLink(long docId);  XWikiLink(long docId, String link, String fullName); long getDocId(); void setDocId(long docId); void setLink(String link); String getLink(); String getFullName(); void setFullName(String fullName); @Override boolean equals(Object obj); @Override int hashCode(); String toString();  }