PersistableBundleKt
public final class PersistableBundleKt
Summary
Public methods |
|
|---|---|
static final @NonNull PersistableBundle |
Returns a new empty |
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 |
Public methods
persistableBundleOf
public static final @NonNull PersistableBundle persistableBundleOf()
Returns a new empty PersistableBundle.
persistableBundleOf
public static final @NonNull PersistableBundlepersistableBundleOf(@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, Boolean, and String and arrays of these types.
| Throws | |
|---|---|
IllegalArgumentException |
When a value is not a supported type of |
toPersistableBundle
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, Boolean, and String and arrays of these types.
| Throws | |
|---|---|
IllegalArgumentException |
When a value is not a supported type of |