package kz.istt.locust;

import android.os.Parcel;
import android.os.Parcelable;


public class LatLon implements android.os.Parcelable{
    String uid;
    public double lat;
    public double lon;

    public static final Parcelable.Creator<LatLon> CREATOR = new Parcelable.Creator<LatLon>() {
        @Override
        public LatLon createFromParcel(Parcel source) {
            String uid = source.readString();
            double lat = source.readDouble();
            double lon = source.readDouble();
            return new LatLon(uid, lat, lon);
        }

        @Override
        public LatLon[] newArray(int size) {
            return new LatLon[size];
        }
    };

    LatLon(String uid, double lat, double lon){
        this.uid=uid;
        this.lat=lat;
        this.lon=lon;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(uid);
        dest.writeDouble(lat);
        dest.writeDouble(lon);
    }
}
