package com.fxy.detection.bean; import android.os.Parcel; import android.os.Parcelable; import java.util.ArrayList; import java.util.List; public class OptionsBean implements Parcelable { private String type = ""; // private String attr_id = ""; // private String title = ""; // private String content = ""; // private String result = ""; // private String tip = ""; // private String name = ""; // private List need_photo = new ArrayList<>(); // private List confirm = new ArrayList<>(); // private List btns = new ArrayList<>(); // private Boolean checked = false; public OptionsBean() { } protected OptionsBean(Parcel in) { type = in.readString(); attr_id = in.readString(); title = in.readString(); content = in.readString(); result = in.readString(); tip = in.readString(); name = in.readString(); need_photo = in.createTypedArrayList(NeedPhotoBean.CREATOR); confirm = in.createTypedArrayList(RepairConfirmBean.CREATOR); btns = in.createTypedArrayList(BtnInfoBean.CREATOR); byte tmpChecked = in.readByte(); checked = tmpChecked == 0 ? null : tmpChecked == 1; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(type); dest.writeString(attr_id); dest.writeString(title); dest.writeString(content); dest.writeString(result); dest.writeString(tip); dest.writeString(name); dest.writeTypedList(need_photo); dest.writeTypedList(confirm); dest.writeTypedList(btns); dest.writeByte((byte) (checked == null ? 0 : checked ? 1 : 2)); } @Override public int describeContents() { return 0; } public static final Creator CREATOR = new Creator() { @Override public OptionsBean createFromParcel(Parcel in) { return new OptionsBean(in); } @Override public OptionsBean[] newArray(int size) { return new OptionsBean[size]; } }; public String getType() { return type; } public void setType(String type) { this.type = type; } public String getAttrId() { return attr_id; } public void setAttrId(String attr_id) { this.attr_id = attr_id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getResult() { return result; } public void setResult(String result) { this.result = result; } public List getNeedPhoto() { return need_photo; } public void setNeedPhoto(List need_photo) { this.need_photo = need_photo; } public List getConfirm() { return confirm; } public void setConfirm(List confirm) { this.confirm = confirm; } public List getBtns() { return btns; } public void setBtns(List btns) { this.btns = btns; } public Boolean getChecked() { return checked; } public void setChecked(Boolean checked) { this.checked = checked; } public String getTip() { return tip; } public OptionsBean setTip(String tip) { this.tip = tip; return this; } public String getName() { return name; } public OptionsBean setName(String name) { this.name = name; return this; } }