package com.uiui.zyappstore.bean;

import java.io.Serializable;

/**
 * Created by Administrator on 2016/10/9.
 */
public class AppDownloadInfo implements Serializable {

    private String url;                 //文件URL
    private String targetPath;          //保存文件地址
    private String fileName;            //保存的文件名
    private float progress;             //下载进度
    private int state;              //当前状态
    private long totalLength;           //总大小
    private long downloadLength;        //已下载大小
    private String packageName;            //保存的包名
    public String version;;            //版本信息
    private Serializable data;          //额外的数据

    @Override
    public boolean equals(Object obj) {
        AppDownloadInfo info = (AppDownloadInfo) obj;
        return url.equals(info.getUrl()) && packageName.equals(info.packageName);
    }

    @Override
    public int hashCode() {
        String str = url + packageName;
        return str.hashCode();
    }

    public Serializable getData() {
        return data;
    }

    public void setData(Serializable data) {
        this.data = data;
    }

    public AppDownloadInfo() {
        super();
    }

    public String getVersion() {
        return version;
    }

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

    public String getPackageName() {
        return packageName;
    }

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

    public long getTotalLength() {
        return totalLength;
    }

    public void setTotalLength(long totalLength) {
        this.totalLength = totalLength;
    }

    public long getDownloadLength() {
        return downloadLength;
    }

    public void setDownloadLength(long downloadLength) {
        this.downloadLength = downloadLength;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getTargetPath() {
        return targetPath;
    }

    public void setTargetPath(String targetPath) {
        this.targetPath = targetPath;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public float getProgress() {
        return progress;
    }

    public void setProgress(float progress) {
        this.progress = progress;
    }


}
