PersistableBundleKt

public final class PersistableBundleKt


Summary

Public methods

static final @RequiresApi(value = 21) @NonNull PersistableBundle

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

static final @RequiresApi(value = 21) @NonNull PersistableBundle

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

Public methods

persistableBundleOf

@RequiresApi(value = 21)
public static final @NonNull PersistableBundle persistableBundleOf(Pair<StringObject> pairs)

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

Supported value types are Int, Long, Double, and String and arrays of these types. On API 22 and later Boolean and BooleanArray are also supported.

Throws
kotlin.IllegalArgumentException

When a value is not a supported type of PersistableBundle.

PersistableBundleKt.toPersistableBundle

@RequiresApi(value = 21)
public static final @NonNull PersistableBundle PersistableBundleKt.toPersistableBundle(Map<StringObject> receiver)

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

Supported value types are Int, Long, Double, and String and arrays of these types. On API 22 and later Boolean and BooleanArray are also supported.

Throws
kotlin.IllegalArgumentException

When a value is not a supported type of PersistableBundle.