Rx3Preference

interface Rx3Preference<T : Any> : Preference<T>

A preference of type T that exposes RxJava2 Observable as the reactive framework. Instances are created from Rx3SharedPreferences factory.

This preference exposes RxJava2 specific functions.

Properties

Link copied to clipboard
abstract val adapter: Adapter<T>
Link copied to clipboard
abstract val defaultValue: T
Link copied to clipboard
abstract val isSet: Boolean
Link copied to clipboard
abstract val key: String?
Link copied to clipboard
Link copied to clipboard
abstract var value: T

Functions

Link copied to clipboard
abstract fun asConsumer(): Consumer<in T>

An action which stores a new value for this preference

Link copied to clipboard
abstract fun asObservable(): Observable<T>

Observe changes to this preference. The current value or defaultValue will be emitted on start of collection.

Link copied to clipboard
open fun defaultValue(): T

Legacy function to support transition from f2prateek/rx-preference.

Link copied to clipboard
abstract fun delete()
Link copied to clipboard
open fun get(): T

Legacy function to support transition from f2prateek/rx-preference.

Link copied to clipboard
open fun key(): String?

Legacy function to support transition from f2prateek/rx-preference.

Link copied to clipboard
abstract fun set(value: T)

Legacy function to support transition from f2prateek/rx-preference.