package com.bjzc.bhzhgd.bean;

import android.os.Parcel;
import android.os.Parcelable;
import java.util.ArrayList;

public class Q4OptionBean  implements Parcelable {
    private int state;
    private String msg;
    private ArrayList<DataBean> data;

    public int getState() {
        return state;
    }

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

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public ArrayList<DataBean> getData() {
        return data;
    }

    public void setData(ArrayList<DataBean> data) {
        this.data = data;
    }

    public static class DataBean  implements Parcelable{

        private String XLID;
        private String XLMC;
        private boolean isSelected; //是否选中的标识

        public boolean isSelected() {
            return isSelected;
        }

        public void setSelected(boolean selected) {
            isSelected = selected;
        }

        public String getXLID() {
            return XLID;
        }

        public void setXLID(String XLID) {
            this.XLID = XLID;
        }

        public String getXLMC() {
            return XLMC;
        }

        public void setXLMC(String XLMC) {
            this.XLMC = XLMC;
        }



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

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.XLID);
            dest.writeString(this.XLMC);
            dest.writeByte((byte)(this.isSelected ?1:0));
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.XLID = in.readString();
            this.XLMC = in.readString();
            this.isSelected = in.readByte()!=0;
        }

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

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }
    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.state);
        dest.writeString(this.msg);
        dest.writeList(this.data);
    }

    public Q4OptionBean() {
    }

    protected Q4OptionBean(Parcel in) {
        this.state = in.readInt();
        this.msg = in.readString();
        this.data = new ArrayList<DataBean>();
        in.readList(this.data, DataBean.class.getClassLoader());
    }

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

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