blob: 1ad584f8c899c5c66cffec5c3e1643d6f62658e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
package com.mapbox.mapboxsdk.geometry;
/**
* Implementation of iOS MGLCoordinateBounds
*/
public class CoordinateBounds {
private LatLng southWest;
private LatLng northEast;
public CoordinateBounds(LatLng southWest, LatLng northEast) {
this.southWest = southWest;
this.northEast = northEast;
}
public LatLng getSouthWest() {
return southWest;
}
public void setSouthWest(LatLng southWest) {
this.southWest = southWest;
}
public LatLng getNorthEast() {
return northEast;
}
public void setNorthEast(LatLng northEast) {
this.northEast = northEast;
}
@Override
public int hashCode() {
int result;
long temp;
temp = southWest.hashCode();
result = (int) (temp ^ (temp >>> 32));
temp = northEast.hashCode();
result = 31 * result + (int) (temp ^ (temp >>> 32));
return result;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o instanceof CoordinateBounds) {
CoordinateBounds other = (CoordinateBounds) o;
return getNorthEast().equals(other.getNorthEast())
&& getSouthWest().equals(other.getSouthWest());
}
return false;
}
@Override
public String toString() {
return "CoordinateBounds [northEast[" + getNorthEast() + "], southWest[]" + getSouthWest() + "]";
}
}
|