package com.fxy.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 重量对象
 *
 * @author qin.guilin
 *
 */
public class ScalesBean implements Parcelable {


    public String weight_one="";
    public String weight_two="";


    @Override
    public String toString() {
        return "ScalesBean{" +
                "weight_one=" + weight_one +
                ", weight_two=" + weight_two +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.weight_one);
        dest.writeString(this.weight_two);
    }

    public ScalesBean() {
    }

    protected ScalesBean(Parcel in) {
        this.weight_one     = in.readString();
        this.weight_two     = in.readString();
    }

    public static final Creator<ScalesBean> CREATOR = new Creator<ScalesBean>() {
        @Override
        public ScalesBean createFromParcel(Parcel source) {
            return new ScalesBean(source);
        }

        @Override
        public ScalesBean[] newArray(int size) {
            return new ScalesBean[size];
        }
    };



    public String getWeight(String weight) {
        if (this.weight_one.equals(weight)){
            this.weight_one = "";
            this.weight_two = "";
            return weight;
        }else if (this.weight_two.equals(weight)){
            this.weight_one = "";
            this.weight_two = "";
            return weight;

        }else {
            this.weight_one = this.weight_two;
            this.weight_two = weight;
            return "";
        }
    };

}
