/*******************************************************************************
* Copyright (c) 2011 Michel DAVID mimah35-at-gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
package fr.gotorennes.domain;
import android.os.Parcel;
import android.os.Parcelable;
import java.io.Serializable;
public abstract class Localisable<T extends Serializable> implements Parcelable {
public T id;
public String address;
public double latitude;
public double longitude;
protected Localisable() {
super();
}
protected Localisable(Parcel in) {
super();
id = (T) in.readSerializable();
address = in.readString();
latitude = in.readDouble();
longitude = in.readDouble();
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel out, int flags) {
out.writeSerializable(id);
out.writeString(address);
out.writeDouble(latitude);
out.writeDouble(longitude);
}
}