@Test public void testHashCode() { GeometryIndex index1 = service.create(GeometryIndexType.TYPE_VERTEX, 0, 1); GeometryIndex index2 = service.create(GeometryIndexType.TYPE_VERTEX, 0, 1); Assert.assertNotSame(index1.hashCode(), index2.hashCode()); }
@Override public int hashCode() { if (hasChild()) { return (getChild().hashCode() + value) * type.hashCode(); } return (37 + value) * type.hashCode(); }
GeometryIndex { @Override public int hashCode() { if (hasChild()) { return (getChild().hashCode() + value) * type.hashCode(); } return (37 + value) * type.hashCode(); } }
GeometryIndex { @Override public int hashCode() { if (hasChild()) { return (getChild().hashCode() + value) * type.hashCode(); } return (37 + value) * type.hashCode(); } GeometryIndex(); protected  GeometryIndex(GeometryIndexType type, int value, GeometryIndex child); protected  GeometryIndex(GeometryIndex other); }
GeometryIndex { @Override public int hashCode() { if (hasChild()) { return (getChild().hashCode() + value) * type.hashCode(); } return (37 + value) * type.hashCode(); } GeometryIndex(); protected  GeometryIndex(GeometryIndexType type, int value, GeometryIndex child); protected  GeometryIndex(GeometryIndex other); GeometryIndexType getType(); boolean hasChild(); GeometryIndex getChild(); int getValue(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
GeometryIndex { @Override public int hashCode() { if (hasChild()) { return (getChild().hashCode() + value) * type.hashCode(); } return (37 + value) * type.hashCode(); } GeometryIndex(); protected  GeometryIndex(GeometryIndexType type, int value, GeometryIndex child); protected  GeometryIndex(GeometryIndex other); GeometryIndexType getType(); boolean hasChild(); GeometryIndex getChild(); int getValue(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }