GeoId implements Serializable, Comparable<GeoId> { @Pure @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj instanceof GeoId) { return this.id.equals(((GeoId) obj).id); } if (obj instanceof UUID) { return toUUID().equals(obj); } if (obj instanceof GeoLocation) { return this.id.equals(((GeoLocation) obj).toGeoId().id); } return this.id.equals(obj.toString()); } GeoId(String id);   GeoId(double lowerx, double lowery, double upperx, double uppery, String id); @Pure static GeoId valueOf(String geoId); @Override @Pure String toString(); @Pure UUID toUUID(); @Pure @Override int compareTo(GeoId obj); @Pure @Override boolean equals(Object obj); @Pure @Override int hashCode(); @Pure Rectangle2d toBounds2D(); @Pure String getInternalId();  }
@Test public void testEqualsGeoIdGeoId() { assertTrue(this.id11.equals(this.id12)); assertTrue(this.id12.equals(this.id11)); assertFalse(this.id11.equals(this.id13)); assertFalse(this.id12.equals(this.id13)); assertFalse(this.id13.equals(this.id11)); assertFalse(this.id13.equals(this.id11)); assertTrue(this.id21.equals(this.id22)); assertTrue(this.id22.equals(this.id21)); assertFalse(this.id21.equals(this.id23)); assertFalse(this.id22.equals(this.id23)); assertFalse(this.id23.equals(this.id21)); assertFalse(this.id23.equals(this.id22)); }