content: package com.mxt.anitrend.model.entity.anilist;
  
  import android.os.Parcel;
  import android.os.Parcelable;
  
  import io.objectbox.annotation.Entity;
  import io.objectbox.annotation.Id;
  import io.objectbox.annotation.Index;
  
  /**
   * Created by Maxwell on 10/24/2016.
   * API Genres
   */
  
  @Entity
  public class Genre implements Parcelable {
  
      @Id
      private long id;
      @Index
      private String genre;
      private boolean isSelected;
  
      public Genre() {
  
      }
  
      public Genre(String genre) {
          this.genre = genre;
      }
  
      protected Genre(Parcel in) {
          id = in.readLong();
          genre = in.readString();
          isSelected = in.readByte() != 0;
      }
  
      @Override
      public void writeToParcel(Parcel dest, int flags) {
          dest.writeLong(id);
          dest.writeString(genre);
          dest.writeByte((byte) (isSelected ? 1 : 0));
      }
  
      @Override
      public int describeContents() {
          return 0;
      }
  
      public static final Creator<Genre> CREATOR = new Creator<Genre>() {
          @Override
          public Genre createFromParcel(Parcel in) {
              return new Genre(in);
          }
  
          @Override
          public Genre[] newArray(int size) {
              return new Genre[size];
          }
      };
  
      public long getId() {
          return id;
      }
  
      public void setId(long id) {
          this.id = id;
      }
  
      public String getGenre() {
          return genre;
      }
  
      public void setGenre(String genre) {
          this.genre = genre;
      }
  
      public boolean isSelected() {
          return isSelected;
      }
  
      public void setSelected(boolean selected) {
          isSelected = selected;
      }
  
      @Override
      public String toString() {
          return genre;
      }
  }
  