package com.vinted.savestate;

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

/**
 * @author Tadas Valaitis
 * @since 2016-05-12
 */
public class ListItem implements Parcelable {
    String text;

    public ListItem(String text) {
        this.text = text;
    }

    protected ListItem(Parcel in) {
        text = in.readString();
    }

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

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

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

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