summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/ProjectedMeters.java
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2017-07-05 08:37:27 +0200
committerTobrun <tobrun.van.nuland@gmail.com>2017-07-05 08:37:27 +0200
commit14c221fce77ce5041e16db8a40081cbcc54a1902 (patch)
treee887d5d690893f7fcb5001a926e6f41a9fb06c41 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/ProjectedMeters.java
parent60eae41549cec18dfeed5175fe1d6c327060a8de (diff)
parentd2d8a575be2d4f28894c0c1f845cbb464869d97c (diff)
downloadqtlocation-mapboxgl-14c221fce77ce5041e16db8a40081cbcc54a1902.tar.gz
Merge branch 'release-ios-v3.6.0-android-v5.1.0'
# Conflicts: # .travis.yml # circle.yml # cmake/core-files.cmake # include/mbgl/style/function/composite_function.hpp # platform/android/CHANGELOG.md # platform/android/MapboxGLAndroidSDK/build.gradle # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MyBearingTracking.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MyLocationTracking.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationSource.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/CameraChangeDispatcher.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/TrackingSettings.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/light/Light.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/light/Position.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/light/light.java.ejs # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/BitmapUtils.java # platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LightTest.java # platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/light.junit.ejs # platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/CameraPositionActivity.java # platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MockLocationEngine.java # platform/android/dependencies.gradle # platform/android/src/native_map_view.cpp # platform/darwin/scripts/generate-style-code.js # platform/darwin/src/MGLGeometry_Private.h # platform/darwin/src/MGLLight.h # platform/darwin/src/MGLLight.mm # platform/darwin/src/MGLSource.h # platform/darwin/src/MGLStyle.h # platform/darwin/src/MGLStyle.mm # platform/darwin/test/MGLLightTest.mm # platform/default/default_file_source.cpp # platform/ios/CHANGELOG.md # platform/ios/Mapbox-iOS-SDK-symbols.podspec # platform/ios/Mapbox-iOS-SDK.podspec # platform/ios/resources/Images.xcassets/default_marker.imageset/default_marker.pdf # platform/macos/CHANGELOG.md # scripts/generate-shaders.js # src/mbgl/layout/symbol_layout.cpp # src/mbgl/programs/program.hpp # src/mbgl/programs/symbol_program.hpp # src/mbgl/programs/uniforms.hpp # src/mbgl/renderer/frame_history.cpp # src/mbgl/renderer/paint_property_binder.hpp # src/mbgl/shaders/line.cpp # src/mbgl/shaders/line_pattern.cpp # src/mbgl/shaders/line_sdf.cpp # src/mbgl/sprite/sprite_atlas.hpp # src/mbgl/style/layers/line_layer_properties.hpp # src/mbgl/style/sources/geojson_source.cpp # src/mbgl/style/style.cpp # src/mbgl/text/glyph_atlas.hpp # src/mbgl/tile/geometry_tile.cpp # src/mbgl/tile/geometry_tile.hpp # test/style/style.test.cpp
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/ProjectedMeters.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/ProjectedMeters.java45
1 files changed, 40 insertions, 5 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/ProjectedMeters.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/ProjectedMeters.java
index 761d8f2a8b..fa84c33b2b 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/ProjectedMeters.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/ProjectedMeters.java
@@ -13,6 +13,9 @@ import android.os.Parcelable;
*/
public class ProjectedMeters implements IProjectedMeters, Parcelable {
+ /**
+ * Inner class responsible for recreating Parcels into objects.
+ */
public static final Creator<ProjectedMeters> CREATOR = new Creator<ProjectedMeters>() {
public ProjectedMeters createFromParcel(Parcel in) {
return new ProjectedMeters(in);
@@ -47,6 +50,12 @@ public class ProjectedMeters implements IProjectedMeters, Parcelable {
this.easting = projectedMeters.easting;
}
+ /**
+ * Creates a ProjectedMeters from a Parcel.
+ *
+ * @param in The parcel to create from
+ * @return a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
+ */
private ProjectedMeters(Parcel in) {
northing = in.readDouble();
easting = in.readDouble();
@@ -72,22 +81,32 @@ public class ProjectedMeters implements IProjectedMeters, Parcelable {
return easting;
}
+ /**
+ * Indicates whether some other object is "equal to" this one.
+ *
+ * @param other The object to compare this to
+ * @return true if equal, false if not
+ */
@Override
- public boolean equals(Object o) {
- if (this == o) {
+ public boolean equals(Object other) {
+ if (this == other) {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (other == null || getClass() != other.getClass()) {
return false;
}
- ProjectedMeters projectedMeters = (ProjectedMeters) o;
+ ProjectedMeters projectedMeters = (ProjectedMeters) other;
return Double.compare(projectedMeters.easting, easting) == 0
&& Double.compare(projectedMeters.northing, northing) == 0;
-
}
+ /**
+ * Returns a hash code value for the object.
+ *
+ * @return the hash code of this
+ */
@Override
public int hashCode() {
int result;
@@ -99,16 +118,32 @@ public class ProjectedMeters implements IProjectedMeters, Parcelable {
return result;
}
+ /**
+ * Returns a string representation of the object.
+ *
+ * @return the string representation of this
+ */
@Override
public String toString() {
return "ProjectedMeters [northing=" + northing + ", easting=" + easting + "]";
}
+ /**
+ * Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
+ *
+ * @return a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
+ */
@Override
public int describeContents() {
return 0;
}
+ /**
+ * Flatten this object in to a Parcel.
+ *
+ * @param out The Parcel in which the object should be written.
+ * @param flags Additional flags about how the object should be written
+ */
@Override
public void writeToParcel(Parcel out, int flags) {
out.writeDouble(northing);