blob: 7d90845f7b1cafcea5008225046de1676cc1b607 [file] [log] [blame]
Nick Anthony0537c822020-02-12 15:25:40 -05001// Signature format: 3.0
Rohit Sathyanarayanaa7e02ea2020-04-09 16:24:46 -07002package androidx.datastore.preferences {
3
Rohit Sathyanarayana075ea442020-05-06 17:16:11 -07004 public final class PreferenceDataStoreFactory {
5 ctor public PreferenceDataStoreFactory();
6 method public androidx.datastore.DataStore<androidx.datastore.preferences.Preferences> create(kotlin.jvm.functions.Function0<? extends java.io.File> produceFile, androidx.datastore.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.Preferences>? corruptionHandler = null, java.util.List<? extends kotlin.jvm.functions.Function0<? extends androidx.datastore.DataMigration<androidx.datastore.preferences.Preferences>>> migrationProducers = listOf(), kotlinx.coroutines.CoroutineScope scope = CoroutineScope(Dispatchers.IO + SupervisorJob()));
Treehugger Robot52e89fb2020-05-12 20:25:34 +00007 method public androidx.datastore.DataStore<androidx.datastore.preferences.Preferences> create(kotlin.jvm.functions.Function0<? extends java.io.File> produceFile, androidx.datastore.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.Preferences>? corruptionHandler = null, java.util.List<? extends kotlin.jvm.functions.Function0<? extends androidx.datastore.DataMigration<androidx.datastore.preferences.Preferences>>> migrationProducers = listOf());
8 method public androidx.datastore.DataStore<androidx.datastore.preferences.Preferences> create(kotlin.jvm.functions.Function0<? extends java.io.File> produceFile, androidx.datastore.handlers.ReplaceFileCorruptionHandler<androidx.datastore.preferences.Preferences>? corruptionHandler = null);
9 method public androidx.datastore.DataStore<androidx.datastore.preferences.Preferences> create(kotlin.jvm.functions.Function0<? extends java.io.File> produceFile);
Rohit Sathyanarayana075ea442020-05-06 17:16:11 -070010 }
11
Rohit Sathyanarayanaa7e02ea2020-04-09 16:24:46 -070012 public final class Preferences {
13 method public operator boolean contains(String key);
14 method public java.util.Map<java.lang.String,java.lang.Object> getAll();
15 method public boolean getBoolean(String key, boolean defaultValue);
16 method public float getFloat(String key, float defaultValue);
17 method public int getInt(String key, int defaultValue);
18 method public long getLong(String key, long defaultValue);
19 method public String getString(String key, String defaultValue);
20 method public java.util.Set<java.lang.String> getStringSet(String key, java.util.Set<java.lang.String> defaultValue);
21 method public androidx.datastore.preferences.Preferences.Builder toBuilder();
Aurimas Liutikasafd4a792020-06-22 13:35:25 -070022 field public static final androidx.datastore.preferences.Preferences.Companion Companion;
Rohit Sathyanarayanaa7e02ea2020-04-09 16:24:46 -070023 }
24
25 public static final class Preferences.Builder {
26 ctor public Preferences.Builder();
27 method public androidx.datastore.preferences.Preferences build();
28 method public androidx.datastore.preferences.Preferences.Builder clear();
29 method public androidx.datastore.preferences.Preferences.Builder remove(String key);
30 method public androidx.datastore.preferences.Preferences.Builder setBoolean(String key, boolean newValue);
31 method public androidx.datastore.preferences.Preferences.Builder setFloat(String key, float newValue);
32 method public androidx.datastore.preferences.Preferences.Builder setInt(String key, int newValue);
33 method public androidx.datastore.preferences.Preferences.Builder setLong(String key, long newValue);
34 method public androidx.datastore.preferences.Preferences.Builder setString(String key, String newValue);
35 method public androidx.datastore.preferences.Preferences.Builder setStringSet(String key, java.util.Set<java.lang.String> newValue);
36 }
37
38 public static final class Preferences.Companion {
39 method public androidx.datastore.preferences.Preferences empty();
40 }
41
Rohit Sathyanarayana5ae89042020-04-29 12:51:20 -070042 public final class SharedPreferencesMigration {
43 method public static kotlin.jvm.functions.Function0<androidx.datastore.DataMigration<androidx.datastore.preferences.Preferences>> create(android.content.Context context, String sharedPreferencesName, java.util.Set<java.lang.String>? keysToMigrate = MIGRATE_ALL_KEYS, boolean deleteEmptyPreferences = true);
Aurimas Liutikasafd4a792020-06-22 13:35:25 -070044 field public static final androidx.datastore.preferences.SharedPreferencesMigration.Companion Companion;
Rohit Sathyanarayana5ae89042020-04-29 12:51:20 -070045 }
46
47 public static final class SharedPreferencesMigration.Companion {
48 method public kotlin.jvm.functions.Function0<androidx.datastore.DataMigration<androidx.datastore.preferences.Preferences>> create(android.content.Context context, String sharedPreferencesName, java.util.Set<java.lang.String>? keysToMigrate = MIGRATE_ALL_KEYS, boolean deleteEmptyPreferences = true);
49 }
50
Rohit Sathyanarayanaa7e02ea2020-04-09 16:24:46 -070051}
52