package com.mjsheng.myappstore.bean;

import android.graphics.drawable.Drawable;

import java.io.Serializable;

public class AppInfo implements Serializable {

    public boolean LOCAL_APP = false;
    public boolean STORE_APP = false;
    public String TAG = "";
    private String appName;
    private String packageName;
    private Drawable icon;
    private String category;
    private String sub_category;
    private String version;
    private long appSize;
    private String dataDir;


    public String getDataDir() {
        return dataDir;
    }

    public void setDataDir(String dataDir) {
        this.dataDir = dataDir;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public long getAppSize() {
        return appSize;
    }

    public void setAppSize(long appSize) {
        this.appSize = appSize;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getSub_category() {
        return sub_category;
    }

    public void setSub_category(String sub_category) {
        this.sub_category = sub_category;
    }

    public boolean isSTORE_APP() {
        return STORE_APP;
    }

    public String getTAG() {
        return TAG;
    }

    public void setTAG(String TAG) {
        this.TAG = TAG;
    }


    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public Drawable getIcon() {
        return icon;
    }

    public void setIcon(Drawable draIcon) {
        this.icon = draIcon;
    }

    public boolean equals(Object obj) {
        if (this == obj)      //传入的对象就是它自己，如s.equals(s)；肯定是相等的；
            return true;
        if (obj == null)     //如果传入的对象是空，肯定不相等
            return false;
        if (getClass() != obj.getClass())  //如果不是同一个类型的，如Studnet类和Animal类，
            //也不用比较了，肯定是不相等的
            return false;
        AppInfo other = (AppInfo) obj;
        if (appName == null) {
            if (other.appName != null)
                return false;
        } else if (!appName.equals(other.appName))   //如果name属性相等，则相等
            return false;
        return true;
    }

}