package com.chute.sdk.v2.model;
import android.os.Parcel;
import android.os.Parcelable;
import com.fasterxml.jackson.annotation.JsonProperty;
public class LocationModel implements Parcelable {
@JsonProperty("latitude")
private String latitude;
@JsonProperty("longitude")
private String longitude;
public LocationModel() {
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((latitude == null) ? 0 : latitude.hashCode());
result = prime * result
+ ((longitude == null) ? 0 : longitude.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
LocationModel other = (LocationModel) obj;
if (latitude == null) {
if (other.latitude != null)
return false;
} else if (!latitude.equals(other.latitude))
return false;
if (longitude == null) {
if (other.longitude != null)
return false;
} else if (!longitude.equals(other.longitude))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("LocationModel [latitude=");
builder.append(latitude);
builder.append(", longitude=");
builder.append(longitude);
builder.append("]");
return builder.toString();
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(latitude);
dest.writeString(longitude);
}
public LocationModel(Parcel in) {
latitude = in.readString();
longitude = in.readString();
}
public static final Creator<LocationModel> CREATOR = new Creator<LocationModel>() {
@Override
public LocationModel createFromParcel(Parcel in) {
return new LocationModel(in);
}
@Override
public LocationModel[] newArray(int size) {
return new LocationModel[size];
}
};
}