zalzondabuzz

Movie

Mar 28th, 2019
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.91 KB | None | 0 0
  1. package com.zlz.moviecatalogdicoding;
  2.  
  3. import android.os.Parcel;
  4. import android.os.Parcelable;
  5.  
  6. public class Movie implements Parcelable {
  7.  
  8.  
  9.     private String photo, name, description, rating, release;
  10.  
  11.  
  12.     public Movie() {
  13.  
  14.     }
  15.  
  16.     public String getPhoto() {
  17.         return photo;
  18.     }
  19.  
  20.     public void setPhoto(String photo) {
  21.         this.photo = photo;
  22.     }
  23.  
  24.     public String getName() {
  25.         return name;
  26.     }
  27.  
  28.     public void setName(String name) {
  29.         this.name = name;
  30.     }
  31.  
  32.     public String getDescription() {
  33.         return description;
  34.     }
  35.  
  36.     public void setDescription(String description) {
  37.         this.description = description;
  38.     }
  39.  
  40.     public String getRating() {
  41.         return rating;
  42.     }
  43.  
  44.     public void setRating(String rating) {
  45.         this.rating = rating;
  46.     }
  47.  
  48.     public String getRelease() {
  49.         return release;
  50.     }
  51.  
  52.     public void setRelease(String release) {
  53.         this.release = release;
  54.     }
  55.  
  56.  
  57.     @Override
  58.     public int describeContents() {
  59.         return 0;
  60.     }
  61.  
  62.     @Override
  63.     public void writeToParcel(Parcel dest, int flags) {
  64.         dest.writeString(this.name);
  65.         dest.writeString(this.description);
  66.         dest.writeString(this.rating);
  67.         dest.writeString(this.release);
  68.         dest.writeString(this.photo);
  69.     }
  70.  
  71.     protected Movie(Parcel in) {
  72.         this.name = in.readString();
  73.         this.description = in.readString();
  74.         this.rating = in.readString();
  75.         this.release = in.readString();
  76.         this.photo = in.readString();
  77.     }
  78.  
  79.     public static final Creator<Movie> CREATOR = new Creator<Movie>() {
  80.         @Override
  81.         public Movie createFromParcel(Parcel source) {
  82.             return new Movie(source);
  83.         }
  84.  
  85.         @Override
  86.         public Movie[] newArray(int size) {
  87.             return new Movie[size];
  88.         }
  89.     };
  90. }
Add Comment
Please, Sign In to add comment