package epson.print.screen;

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

public class PaperSourceSetting implements Parcelable {
    public static final Parcelable.Creator<PaperSourceSetting> CREATOR = new Parcelable.Creator<PaperSourceSetting>() {
        public PaperSourceSetting createFromParcel(Parcel parcel) {
            return new PaperSourceSetting(parcel);
        }

        public PaperSourceSetting[] newArray(int i) {
            return new PaperSourceSetting[i];
        }
    };
    public boolean bSupportESCPR;
    public int paperSizeId;
    public int paperSource;
    public int paperTypeId;

    public int describeContents() {
        return 0;
    }

    public PaperSourceSetting() {
        bSupportESCPR = true;
    }

    private PaperSourceSetting(Parcel parcel) {
        bSupportESCPR = true;
        paperSource = parcel.readInt();
        paperSizeId = parcel.readInt();
        paperTypeId = parcel.readInt();
        bSupportESCPR = ((Boolean) parcel.readValue(Boolean.class.getClassLoader())).booleanValue();
    }

    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(paperSource);
        parcel.writeInt(paperSizeId);
        parcel.writeInt(paperTypeId);
        parcel.writeValue(Boolean.valueOf(bSupportESCPR));
    }

    public boolean equals(PaperSourceSetting paperSourceSetting) {
        if (paperSizeId == paperSourceSetting.paperSizeId && paperTypeId == paperSourceSetting.paperTypeId && paperSource == paperSourceSetting.paperSource) {
            return true;
        }
        return false;
    }
}
