@Test public void equalsTest() { BoundingBox boundingBox1 = new BoundingBox(MIN_LATITUDE, MIN_LONGITUDE, MAX_LATITUDE, MAX_LONGITUDE); BoundingBox boundingBox2 = new BoundingBox(MIN_LATITUDE, MIN_LONGITUDE, MAX_LATITUDE, MAX_LONGITUDE); BoundingBox boundingBox3 = new BoundingBox(0, 0, 0, 0); TestUtils.equalsTest(boundingBox1, boundingBox2); Assert.assertFalse(boundingBox1.equals(boundingBox3)); Assert.assertFalse(boundingBox3.equals(boundingBox1)); Assert.assertFalse(boundingBox1.equals(new Object())); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof BoundingBox)) { return false; } BoundingBox other = (BoundingBox) obj; if (this.maxLatitudeE6 != other.maxLatitudeE6) { return false; } else if (this.maxLongitudeE6 != other.maxLongitudeE6) { return false; } else if (this.minLatitudeE6 != other.minLatitudeE6) { return false; } else if (this.minLongitudeE6 != other.minLongitudeE6) { return false; } return true; }
BoundingBox implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof BoundingBox)) { return false; } BoundingBox other = (BoundingBox) obj; if (this.maxLatitudeE6 != other.maxLatitudeE6) { return false; } else if (this.maxLongitudeE6 != other.maxLongitudeE6) { return false; } else if (this.minLatitudeE6 != other.minLatitudeE6) { return false; } else if (this.minLongitudeE6 != other.minLongitudeE6) { return false; } return true; } }
BoundingBox implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof BoundingBox)) { return false; } BoundingBox other = (BoundingBox) obj; if (this.maxLatitudeE6 != other.maxLatitudeE6) { return false; } else if (this.maxLongitudeE6 != other.maxLongitudeE6) { return false; } else if (this.minLatitudeE6 != other.minLatitudeE6) { return false; } else if (this.minLongitudeE6 != other.minLongitudeE6) { return false; } return true; } BoundingBox(int minLatitudeE6, int minLongitudeE6, int maxLatitudeE6, int maxLongitudeE6); }
BoundingBox implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof BoundingBox)) { return false; } BoundingBox other = (BoundingBox) obj; if (this.maxLatitudeE6 != other.maxLatitudeE6) { return false; } else if (this.maxLongitudeE6 != other.maxLongitudeE6) { return false; } else if (this.minLatitudeE6 != other.minLatitudeE6) { return false; } else if (this.minLongitudeE6 != other.minLongitudeE6) { return false; } return true; } BoundingBox(int minLatitudeE6, int minLongitudeE6, int maxLatitudeE6, int maxLongitudeE6); boolean contains(GeoPoint geoPoint); @Override boolean equals(Object obj); GeoPoint getCenterPoint(); double getMaxLatitude(); double getMaxLongitude(); double getMinLatitude(); double getMinLongitude(); @Override int hashCode(); @Override String toString(); }
BoundingBox implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof BoundingBox)) { return false; } BoundingBox other = (BoundingBox) obj; if (this.maxLatitudeE6 != other.maxLatitudeE6) { return false; } else if (this.maxLongitudeE6 != other.maxLongitudeE6) { return false; } else if (this.minLatitudeE6 != other.minLatitudeE6) { return false; } else if (this.minLongitudeE6 != other.minLongitudeE6) { return false; } return true; } BoundingBox(int minLatitudeE6, int minLongitudeE6, int maxLatitudeE6, int maxLongitudeE6); boolean contains(GeoPoint geoPoint); @Override boolean equals(Object obj); GeoPoint getCenterPoint(); double getMaxLatitude(); double getMaxLongitude(); double getMinLatitude(); double getMinLongitude(); @Override int hashCode(); @Override String toString(); final int maxLatitudeE6; final int maxLongitudeE6; final int minLatitudeE6; final int minLongitudeE6; }