diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/module/telemetry/MapDragendEvent.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/module/telemetry/MapDragendEvent.java | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/module/telemetry/MapDragendEvent.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/module/telemetry/MapDragendEvent.java index 36c75112f1..0b9646b462 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/module/telemetry/MapDragendEvent.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/module/telemetry/MapDragendEvent.java @@ -76,6 +76,86 @@ class MapDragendEvent extends Event { } @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + MapDragendEvent that = (MapDragendEvent) o; + + if (batteryLevel != that.batteryLevel) { + return false; + } + if (Double.compare(that.lat, lat) != 0) { + return false; + } + if (Double.compare(that.lng, lng) != 0) { + return false; + } + if (Double.compare(that.zoom, zoom) != 0) { + return false; + } + if (pluggedIn != that.pluggedIn) { + return false; + } + if (wifi != that.wifi) { + return false; + } + if (created != null ? !created.equals(that.created) : that.created != null) { + return false; + } + if (orientation != null ? !orientation.equals(that.orientation) : that.orientation != null) { + return false; + } + if (carrier != null ? !carrier.equals(that.carrier) : that.carrier != null) { + return false; + } + return cellularNetworkType != null ? cellularNetworkType.equals(that.cellularNetworkType) : + that.cellularNetworkType == null; + } + + @Override + public int hashCode() { + int result; + long temp; + result = event.hashCode(); + result = 31 * result + (created != null ? created.hashCode() : 0); + result = 31 * result + (orientation != null ? orientation.hashCode() : 0); + result = 31 * result + (carrier != null ? carrier.hashCode() : 0); + result = 31 * result + (cellularNetworkType != null ? cellularNetworkType.hashCode() : 0); + result = 31 * result + batteryLevel; + temp = Double.doubleToLongBits(lat); + result = 31 * result + (int) (temp ^ (temp >>> 32)); + temp = Double.doubleToLongBits(lng); + result = 31 * result + (int) (temp ^ (temp >>> 32)); + temp = Double.doubleToLongBits(zoom); + result = 31 * result + (int) (temp ^ (temp >>> 32)); + result = 31 * result + (pluggedIn ? 1 : 0); + result = 31 * result + (wifi ? 1 : 0); + return result; + } + + @Override + public String toString() { + return "MapDragendEvent{" + + "event='" + event + '\'' + + ", created='" + created + '\'' + + ", orientation='" + orientation + '\'' + + ", carrier='" + carrier + '\'' + + ", cellularNetworkType='" + cellularNetworkType + '\'' + + ", batteryLevel=" + batteryLevel + + ", lat=" + lat + + ", lng=" + lng + + ", zoom=" + zoom + + ", pluggedIn=" + pluggedIn + + ", wifi=" + wifi + + '}'; + } + + @Override public int describeContents() { return 0; } |