ribesg
03/02/2016, 2:45 PM@IgnoreUnused
@JvmStatic
val CREATOR = object : Parcelable.Creator<Type<*>> {
override fun newArray(size: Int): Array<out Type<*>?> = arrayOfNulls(size)
override fun createFromParcel(source: Parcel): Type<*> {
val ordinal = source.readInt()
return when (ordinal) {
0 -> STREAM
1 -> ARTICLE
2 -> VIDEO
3 -> WEBSITE
4 -> CHANNEL
5 -> GAME
else -> throw Error()
}
}
}