package com.movie.world.popularmovies;
import android.os.Parcel;
import android.os.Parcelable;
/**
* Created by world on 06/12/15.
*/
public class Movie implements Parcelable {
private int id;
private double voteRange;
private String posterPath, title, overView, date;
public Movie() {
}
public Movie(int id, double voteRange, String posterPath, String overView, String title, String date) {
this.id = id;
this.voteRange = voteRange;
this.posterPath = posterPath;
this.overView = overView;
this.title = title;
this.date = date;
}
protected Movie(Parcel in) {
id = in.readInt();
voteRange = in.readDouble();
posterPath = in.readString();
title = in.readString();
overView = in.readString();
date = in.readString();
}
public static final Creator<Movie> CREATOR = new Creator<Movie>() {
@Override
public Movie createFromParcel(Parcel in) {
return new Movie(in);
}
@Override
public Movie[] newArray(int size) {
return new Movie[size];
}
};
public void setId(int id) {
this.id = id;
}
public void setVoteRange(double voteRange) {
this.voteRange = voteRange;
}
public void setPosterPath(String posterPath) {
this.posterPath = posterPath;
}
public void setTitle(String title) {
this.title = title;
}
public void setOverView(String overView) {
this.overView = overView;
}
public void setDate(String date) {
this.date = date;
}
public int getId() {
return id;
}
public double getVoteRange() {
return voteRange;
}
public String getPosterPath() {
return posterPath;
}
public String getTitle() {
return title;
}
public String getOverView() {
return overView;
}
public String getDate() {
return date;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(id);
dest.writeDouble(voteRange);
dest.writeString(posterPath);
dest.writeString(title);
dest.writeString(overView);
dest.writeString(date);
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.