Rx3SharedPreferences

class Rx3SharedPreferences : BaseRxSharedPreferences

Preference factory class to provide Rx3Preference objects

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard

Creates a Boolean preference for the key with a default of false

open override fun getBoolean(key: String?, defaultValue: Boolean): Rx3Preference<Boolean>

Creates a Boolean preference for the key with a default of defaultValue

Link copied to clipboard
inline fun <T : Enum<T>> getEnum(key: String?, defaultValue: T): Rx3Preference<T>

Creates a T preference for the key using the enum class type T with a default of defaultValue

open override fun <T : Enum<T>> getEnum(key: String?, defaultValue: T, clazz: Class<T>): Rx3Preference<T>

Creates a T preference for the key using the enum class clazz with a default of defaultValue

Link copied to clipboard

Creates a Float preference for the key with a default of 0F

open override fun getFloat(key: String?, defaultValue: Float): Rx3Preference<Float>

Creates a Float preference for the key with a default of defaultValue

Link copied to clipboard

Creates a Int preference for the key with a default of 0

open override fun getInteger(key: String?, defaultValue: Int): Rx3Preference<Int>

Creates a Int preference for the key with a default of defaultValue

Link copied to clipboard

Creates a Long preference for the key with a default of 0L

open override fun getLong(key: String?, defaultValue: Long): Rx3Preference<Long>

Creates a Long preference for the key with a default of defaultValue

Link copied to clipboard
open override fun <T : Any> getObjectNonNull(key: String?, defaultValue: T, converter: Preference.Converter<T>): Rx3Preference<T>

Creates a T preference for the key using the converter, and with a default of defaultValue

Link copied to clipboard

Creates a String preference for the key with a default of an empty string

open override fun getString(key: String?, defaultValue: String?): Rx3Preference<String>

Creates a String preference for the key with a default of defaultValue

Link copied to clipboard

Creates a string Set preference for the key with a default of emptySet

open override fun getStringSet(key: String?, defaultValue: Set<String?>?): Rx3Preference<Set<String?>>

Creates a string Set preference for the key with a default of defaultValue