diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-07-05 18:06:51 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-07-05 18:06:51 -0700 |
commit | 74bcca380dd7faa7a629d59e3346506e6a8cca34 (patch) | |
tree | 246d8c587621fcc753bfafc3f85afdb94e8460c9 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/ProjectedMeters.java | |
parent | 5921f692e085bde5d4e8000c33dac29c796acbf0 (diff) | |
parent | 6ca8cd7e24cf919d5eeb0be49d34a02ba9969ac8 (diff) | |
download | qtlocation-mapboxgl-74bcca380dd7faa7a629d59e3346506e6a8cca34.tar.gz |
Merge remote-tracking branch 'origin/tvn-merge-release'
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.java | 45 |
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); |