RxSharedPreferencesMigrationBuilder
class RxSharedPreferencesMigrationBuilder<T>
kotlin.Any | |
↳ | androidx.datastore.rxjava3.RxSharedPreferencesMigrationBuilder |
RxSharedPreferencesMigrationBuilder for the RxSharedPreferencesMigration.
Summary
Public constructors | |
---|---|
<init>(: Context, : String, : RxSharedPreferencesMigration<T>) RxSharedPreferencesMigrationBuilder for the RxSharedPreferencesMigration. |
Public methods | |
---|---|
DataMigration<T> |
build() Build and return the DataMigration instance. |
RxSharedPreferencesMigrationBuilder<T> |
setKeysToMigrate(vararg : String) Set the list of keys to migrate. |
Public constructors
<init>
RxSharedPreferencesMigrationBuilder(
: Context,
: String,
: RxSharedPreferencesMigration<T>)
RxSharedPreferencesMigrationBuilder for the RxSharedPreferencesMigration.
Public methods
build
fun build(): DataMigration<T>
Build and return the DataMigration instance.
Return | |
---|---|
the DataMigration. |
setKeysToMigrate
fun setKeysToMigrate(vararg : String): RxSharedPreferencesMigrationBuilder<T>
Set the list of keys to migrate. The keys will be mapped to datastore.Preferences with their same values. If the key is already present in the new Preferences, the key will not be migrated again. If the key is not present in the SharedPreferences it will not be migrated.
This method is optional and if keysToMigrate is not set, all keys will be migrated from the existing SharedPreferences.
Parameters | |
---|---|
vararg : String | the keys to migrate |
Return | |
---|---|
this |