@Test public void hashCodeTest() { WikiDocument documentA = new WikiDocument("document.a", null, null); WikiDocument documentA2 = new WikiDocument("document.a", null, null); assertEquals(documentA.hashCode(), documentA2.hashCode()); WikiDocument documentB = new WikiDocument("document.b", null, null); assertNotEquals(documentA.hashCode(), documentB.hashCode()); }
@Override public int hashCode() { return getFullName().hashCode(); }
WikiDocument { @Override public int hashCode() { return getFullName().hashCode(); } }
WikiDocument { @Override public int hashCode() { return getFullName().hashCode(); } WikiDocument(String fullName, XDOM xdom, WikiDocument parent); }
WikiDocument { @Override public int hashCode() { return getFullName().hashCode(); } WikiDocument(String fullName, XDOM xdom, WikiDocument parent); String getFullName(); XDOM getXdom(); WikiDocument getParent(); @Override boolean equals(Object obj); @Override int hashCode(); }
WikiDocument { @Override public int hashCode() { return getFullName().hashCode(); } WikiDocument(String fullName, XDOM xdom, WikiDocument parent); String getFullName(); XDOM getXdom(); WikiDocument getParent(); @Override boolean equals(Object obj); @Override int hashCode();  }