ParcelUtils

public class ParcelUtils
extends Object

java.lang.Object
   ↳ androidx.versionedparcelable.ParcelUtils


Utilities for managing VersionedParcelables.

Summary

Public methods

static <T extends VersionedParcelable> T getVersionedParcelable(Bundle bundle, String key)

Get a VersionedParcelable from a Bundle.

static void putVersionedParcelable(Bundle b, String key, VersionedParcelable obj)

Add a VersionedParcelable to an existing Bundle.

Inherited methods

Public methods

getVersionedParcelable

public static T getVersionedParcelable (Bundle bundle, 
                String key)

Get a VersionedParcelable from a Bundle. Returns null if the bundle isn't present or ClassLoader issues occur.

Parameters
bundle Bundle

key String

Returns
T

putVersionedParcelable

public static void putVersionedParcelable (Bundle b, 
                String key, 
                VersionedParcelable obj)

Add a VersionedParcelable to an existing Bundle.

Parameters
b Bundle

key String

obj VersionedParcelable