PersistableBundleKt

Added in 1.1.0

public final class PersistableBundleKt


Summary

Public methods

static final @NonNull PersistableBundle

Returns a new empty PersistableBundle.

static final @NonNull PersistableBundle

This method is deprecated. This method does not provide type safety at compile time.

static final @NonNull PersistableBundle

Covert this map to a PersistableBundle with the key/value pairs as elements.

Public methods

persistableBundleOf

public static final @NonNull PersistableBundle persistableBundleOf()

Returns a new empty PersistableBundle.

persistableBundleOf

public static final @NonNull PersistableBundle persistableBundleOf(@NonNull Pair<@NonNull StringObject>... pairs)

Returns a new PersistableBundle with the given key/value pairs as elements.

Supported value types are Int, Long, Double, Boolean, and String and arrays of these types.

Throws
kotlin.IllegalArgumentException

When a value is not a supported type of PersistableBundle.

toPersistableBundle

public static final @NonNull PersistableBundle toPersistableBundle(@NonNull Map<@NonNull StringObject> receiver)

Covert this map to a PersistableBundle with the key/value pairs as elements.

Supported value types are Int, Long, Double, Boolean, and String and arrays of these types.

Throws
kotlin.IllegalArgumentException

When a value is not a supported type of PersistableBundle.