PreferencesEditor

Interface used for modifying values in a ReadablePreferences object. All changes you make in an editor are batched, and not copied back to the original ReadablePreferences until you call save.

Functions

Link copied to clipboard
abstract fun clear()

Mark in the editor to remove all values from the preferences.

Link copied to clipboard
abstract fun remove(key: String)

Mark in the editor that a preference value should be removed.

Link copied to clipboard
abstract fun save()

Commit your preferences changes back from PreferencesEditor to the ReadablePreferences object it is editing. This atomically performs the requested modifications, replacing whatever is currently in the ReadablePreferences.

Link copied to clipboard
abstract operator fun set(key: String, value: Boolean)

Set a Boolean value in the preferences editor.

abstract operator fun set(key: String, value: Byte)

Set a Byte value in the preferences editor.

abstract operator fun set(key: String, value: Double)

Set a Double value in the preferences editor.

abstract operator fun set(key: String, value: Float)

Set a Float value in the preferences editor.

abstract operator fun set(key: String, value: Int)

Set a Int value in the preferences editor.

abstract operator fun set(key: String, value: Long)

Set a Long value in the preferences editor.

abstract operator fun set(key: String, value: Short)

Set a Short value in the preferences editor.

abstract operator fun set(key: String, value: String?)

Set a String value in the preferences editor.

Inheritors

Link copied to clipboard