public class CartesianCoordinate
extends java.lang.Object
implements android.os.Parcelable
See CoordinateConverter
to convert between Coordinate
and CartesianCoordinate
's building coordinate.
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<CartesianCoordinate> |
CREATOR |
static CartesianCoordinate |
EMPTY |
Constructor and Description |
---|
CartesianCoordinate(CartesianCoordinate copy) |
CartesianCoordinate(double x,
double y) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
double |
distanceTo(CartesianCoordinate cartesianCoordinate)
Calculates the distance (in meters) between this cartesian coordinate and another
|
boolean |
equals(java.lang.Object o) |
double |
getX()
Returns value of coordinate at x-axis
|
double |
getY()
Returns value of coordinate at y-axis
|
int |
hashCode() |
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final CartesianCoordinate EMPTY
public static final android.os.Parcelable.Creator<CartesianCoordinate> CREATOR
public CartesianCoordinate(double x, double y)
public CartesianCoordinate(CartesianCoordinate copy)
public double getX()
public double getY()
public double distanceTo(CartesianCoordinate cartesianCoordinate) throws java.lang.IllegalArgumentException
cartesianCoordinate
- the other cartesian coordinate. Can't be nulljava.lang.IllegalArgumentException
- if cartesianCoordinate
is nullpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable