Preference

interface Preference<T>

A preference of type T. Instances are created from RxSharedPreferences factories.

Types

Link copied to clipboard
interface Converter<T>

Converts instances of T to be stored and retrieved as Strings in SharedPreferences.

Properties

Link copied to clipboard
abstract val adapter: Adapter<T>

The adapter to use for the given type T

Link copied to clipboard
abstract val defaultValue: T

The default value to return when this preference is not set

Link copied to clipboard
abstract val isSet: Boolean

Flag to indicate if the preference has been set

Link copied to clipboard
abstract val key: String?

The key used to store the preference

Link copied to clipboard

The RxSharedPreferences that backs this preference

Link copied to clipboard
abstract var value: T

The current value of the preference

Functions

Link copied to clipboard

Converts a preference of a nullable type to be an Optional of that same type instead.

Link copied to clipboard
abstract fun delete()

Delete the preference from the underlying SharedPreferences