PersistableBundleKt
public final class PersistableBundleKt
Summary
Public methods |
|
|---|---|
static final @NonNull PersistableBundle |
@RequiresApi(value = 21)Returns a new empty |
static final @NonNull PersistableBundle |
@RequiresApi(value = 21)Returns a new |
static final @NonNull PersistableBundle |
@RequiresApi(value = 21)Covert this map to a |
Public methods
persistableBundleOf
@RequiresApi(value = 21)
public static final @NonNull PersistableBundle persistableBundleOf()
Returns a new empty PersistableBundle.
persistableBundleOf
@RequiresApi(value = 21)
public static final @NonNull PersistableBundle persistableBundleOf(@NonNull Pair<@NonNull String, Object>... 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 |
toPersistableBundle
@RequiresApi(value = 21)
public static final @NonNull PersistableBundle toPersistableBundle(@NonNull Map<@NonNull String, Object> 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 |