package tv.ouya.console.api.store;

import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import org.json.JSONException;
import org.json.JSONObject;

public class Tag
  implements Parcelable
{
  public static final Parcelable.Creator<Tag> CREATOR = new Parcelable.Creator()
  {
    public Tag createFromParcel(Parcel paramAnonymousParcel)
    {
      boolean bool = true;
      String str = paramAnonymousParcel.readString();
      if (paramAnonymousParcel.readInt() == 1) {}
      for (;;)
      {
        return new Tag(str, Boolean.valueOf(bool), paramAnonymousParcel.readString());
        bool = false;
      }
    }
    
    public Tag[] newArray(int paramAnonymousInt)
    {
      return new Tag[paramAnonymousInt];
    }
  };
  public Boolean adminOnly;
  private String imageUrl;
  private String name;
  
  public Tag() {}
  
  public Tag(String paramString1, Boolean paramBoolean, String paramString2)
  {
    this.name = paramString1;
    this.adminOnly = paramBoolean;
    this.imageUrl = paramString2;
  }
  
  public Tag(JSONObject paramJSONObject)
    throws JSONException
  {
    readFromJSON(paramJSONObject);
  }
  
  public int describeContents()
  {
    return 0;
  }
  
  public boolean equals(Object paramObject)
  {
    if (this == paramObject) {}
    do
    {
      return true;
      if (!(paramObject instanceof Tag)) {
        return false;
      }
      paramObject = (Tag)paramObject;
      if (!this.name.equals(((Tag)paramObject).name)) {
        return false;
      }
      if (this.adminOnly != this.adminOnly) {
        return false;
      }
    } while (this.imageUrl.equals(((Tag)paramObject).imageUrl));
    return false;
  }
  
  public String getImageUrl()
  {
    return this.imageUrl;
  }
  
  public String getName()
  {
    return this.name;
  }
  
  public int hashCode()
  {
    return (this.name.hashCode() * 31 + this.adminOnly.hashCode()) * 31 + this.imageUrl.hashCode();
  }
  
  public void readFromJSON(JSONObject paramJSONObject)
    throws JSONException
  {
    this.name = paramJSONObject.getString("name");
    this.adminOnly = Boolean.valueOf(paramJSONObject.getBoolean("admin_only"));
    if (paramJSONObject.has("image_url")) {
      this.imageUrl = paramJSONObject.getString("image_url");
    }
  }
  
  public void setName(String paramString)
  {
    this.name = paramString;
  }
  
  public void writeToParcel(Parcel paramParcel, int paramInt)
  {
    paramParcel.writeString(this.name);
    if (this.adminOnly.booleanValue()) {}
    for (paramInt = 1;; paramInt = 0)
    {
      paramParcel.writeInt(paramInt);
      paramParcel.writeString(this.imageUrl);
      return;
    }
  }
}


/* Location:              /home/enzo/Documents/hacking/malwares/viking-horde/classes.jar!/tv/ouya/console/api/store/Tag.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */