ParcelUtils
class ParcelUtils
Utilities for managing VersionedParcelables.
Summary
Public functions |
|
|---|---|
java-static T? |
<T : VersionedParcelable?> getVersionedParcelable(bundle: Bundle, key: String)Get a VersionedParcelable from a Bundle. |
java-static (Mutable)List<T!> |
<T : VersionedParcelable?> getVersionedParcelableList(Get a list of VersionedParcelable from a Bundle. |
java-static Unit |
putVersionedParcelable(b: Bundle, key: String, obj: VersionedParcelable?)Add a VersionedParcelable to an existing Bundle. |
java-static Unit |
putVersionedParcelableList(Add a list of VersionedParcelable to an existing Bundle. |
Public functions
getVersionedParcelable
java-static fun <T : VersionedParcelable?> getVersionedParcelable(bundle: Bundle, key: String): T?
Get a VersionedParcelable from a Bundle. Returns null if the bundle isn't present or ClassLoader issues occur.
getVersionedParcelableList
java-static fun <T : VersionedParcelable?> getVersionedParcelableList(
bundle: Bundle,
key: String?
): (Mutable)List<T!>
Get a list of VersionedParcelable from a Bundle. Returns an empty list if the bundle isn't present or ClassLoader issues occur.
putVersionedParcelable
java-static fun putVersionedParcelable(b: Bundle, key: String, obj: VersionedParcelable?): Unit
Add a VersionedParcelable to an existing Bundle.
putVersionedParcelableList
java-static fun putVersionedParcelableList(
b: Bundle,
key: String,
list: (Mutable)List<VersionedParcelable!>
): Unit
Add a list of VersionedParcelable to an existing Bundle.