package fr.tvbarthel.apps.simpleweatherforcast.openweathermap;


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

public class DailyForecastModel implements Parcelable {

	private long mDateTime;
	private String mDescription;
	private Double mTemperature;
	private int mHumidity;

	public DailyForecastModel() {
	}

	public DailyForecastModel(Parcel in) {
		readFromParcel(in);
	}

	public String getDescription() {
		return mDescription;
	}

	public void setDescription(String description) {
		mDescription = description;
	}

	public int getHumidity() {
		return mHumidity;
	}

	public void setHumidity(int humidity) {
		mHumidity = humidity;
	}

	public long getDateTime() {
		return mDateTime;
	}

	public void setDateTime(long dateTime) {
		mDateTime = dateTime;
	}

	public Double getTemperature() {
		return mTemperature;
	}

	public void setTemperature(Double temperature) {
		mTemperature = temperature;
	}

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

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeLong(mDateTime);
		dest.writeString(mDescription);
		dest.writeInt(mHumidity);
		dest.writeDouble(mTemperature);
	}

	private void readFromParcel(Parcel in) {
		mDateTime = in.readLong();
		mDescription = in.readString();
		mHumidity = in.readInt();
		mTemperature = in.readDouble();
	}

	public static final Parcelable.Creator<DailyForecastModel> CREATOR = new Parcelable.Creator<DailyForecastModel>() {
		@Override
		public DailyForecastModel createFromParcel(Parcel source) {
			return new DailyForecastModel(source);
		}

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

}

@@ -257,16 +257,82 @@
 rature;%0A
+%09private Double mMinTemperature;%0A%09private Double mMaxTemperature;%0A
 %09private
@@ -347,16 +347,16 @@
 midity;%0A
-
 %0A%09public
@@ -979,24 +979,350 @@
 rature;%0A%09%7D%0A%0A
+%09public Double getMinTemperature() %7B%0A%09%09return mMinTemperature;%0A%09%7D%0A%0A%09public void setMinTemperature(Double minTemperature) %7B%0A%09%09mMinTemperature = minTemperature;%0A%09%7D%0A%0A%09public Double getMaxTemperature() %7B%0A%09%09return mMaxTemperature;%0A%09%7D%0A%0A%09public void setMaxTemperature(Double maxTemperature) %7B%0A%09%09mMaxTemperature = maxTemperature;%0A%09%7D%0A%0A
 %09@Override%0A%09
@@ -1558,16 +1558,90 @@
 ature);%0A
+%09%09dest.writeDouble(mMinTemperature);%0A%09%09dest.writeDouble(mMaxTemperature);%0A
 %09%7D%0A%0A%09pri
@@ -1803,16 +1803,90 @@
 uble();%0A
+%09%09mMinTemperature = in.readDouble();%0A%09%09mMaxTemperature = in.readDouble();%0A
 %09%7D%0A%0A%09pub
@@ -2230,11 +2230,12 @@
 %09%09%7D%0A
-
 %09%7D;%0A%0A
+%0A
 %7D%0A

Add min and max temperatures to model.