package com.gh.gamecenter.feature.entity

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

/**
 * Created by LGT on 2016/6/16.
 */
class ThumbnailEntity : Parcelable {

    var type: String? = null

    var url: List<String>? = null

    override fun describeContents(): Int {
        return 0
    }

    override fun writeToParcel(dest: Parcel, flags: Int) {
        dest.writeString(this.type)
        dest.writeStringList(this.url)
    }

    constructor() {}

    protected constructor(`in`: Parcel) {
        this.type = `in`.readString()
        this.url = `in`.createStringArrayList()
    }

    companion object {

        @JvmField
        val CREATOR: Parcelable.Creator<ThumbnailEntity> = object : Parcelable.Creator<ThumbnailEntity> {
            override fun createFromParcel(source: Parcel): ThumbnailEntity {
                return ThumbnailEntity(source)
            }

            override fun newArray(size: Int): Array<ThumbnailEntity?> {
                return arrayOfNulls(size)
            }
        }
    }
}
