@Test public void testHashCode() { ExtractorName n1 = ExtractorName.create("l1", "n1"); ExtractorName n2 = ExtractorName.create("l2", "n1"); ExtractorName n3 = ExtractorName.create("l1", "n3"); ExtractorName n4 = ExtractorName.create("l2", "n2"); ExtractorName n5 = ExtractorName.create("l1", "n1"); assertNotEquals(n1.hashCode(), n2.hashCode()); assertNotEquals(n1.hashCode(), n3.hashCode()); assertNotEquals(n1.hashCode(), n4.hashCode()); assertEquals(n1.hashCode(), n5.hashCode()); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(13, 19); return builder.append(location.hashCode()).append(name.hashCode()).toHashCode(); }
ExtractorName { @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(13, 19); return builder.append(location.hashCode()).append(name.hashCode()).toHashCode(); } }
ExtractorName { @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(13, 19); return builder.append(location.hashCode()).append(name.hashCode()).toHashCode(); } private  ExtractorName(String location, String name); }
ExtractorName { @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(13, 19); return builder.append(location.hashCode()).append(name.hashCode()).toHashCode(); } private  ExtractorName(String location, String name); static ExtractorName create(String location, String name); String getLocation(); String getName(); @Override boolean equals(Object object); @Override int hashCode(); @Override String toString(); }
ExtractorName { @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(13, 19); return builder.append(location.hashCode()).append(name.hashCode()).toHashCode(); } private  ExtractorName(String location, String name); static ExtractorName create(String location, String name); String getLocation(); String getName(); @Override boolean equals(Object object); @Override int hashCode(); @Override String toString();  }