public class Position
extends java.lang.Object
implements android.os.Parcelable
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<Position> |
CREATOR
Parcelable implementation
|
protected boolean |
jniCMemOwn |
protected long |
jniCPtr |
com.ptvag.navigation.sdk.NativeObject |
parent |
Constructor and Description |
---|
Position()
Constructor
|
Position(int x,
int y)
Constructor
|
Position(long cPtr,
boolean cMemoryOwn)
Only for internal use - don't try to call this from Java.
|
Position(long cPtr,
com.ptvag.navigation.sdk.NativeObject parent) |
Position(Position pos)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
delete()
Kills rubbish if owning the object.
|
int |
describeContents() |
boolean |
equals(Position position) |
protected void |
finalize() |
static Position |
fromGeoDez(double lon,
double lat) |
static long |
getCPtr(com.ptvag.navigation.sdk.NativeObject obj) |
int |
getX()
Returns the longitude of the mercator position.
|
int |
getY()
Returns the latitude of the mercator position.
|
void |
setX(int x)
Sets the longitude of the mercator position.
|
void |
setY(int y)
Sets the latitude of the mercator position.
|
GeoPosition |
toGeoPosition()
Converts the mercator position to a geodez position
|
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<Position> CREATOR
protected long jniCPtr
protected boolean jniCMemOwn
public com.ptvag.navigation.sdk.NativeObject parent
public Position(int x, int y)
x
- Mercator position (longitude)y
- Mercator position (latitude)public Position()
public Position(Position pos)
pos
- - Position to initialize withpublic Position(long cPtr, boolean cMemoryOwn)
public Position(long cPtr, com.ptvag.navigation.sdk.NativeObject parent)
public GeoPosition toGeoPosition()
public static Position fromGeoDez(double lon, double lat)
public int getX()
public int getY()
public void setX(int x)
x
- - the longitude.public void setY(int y)
y
- - the latitude.public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
public boolean equals(Position position)
public java.lang.String toString()
toString
in class java.lang.Object
public static long getCPtr(com.ptvag.navigation.sdk.NativeObject obj)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void delete()