Package app.futured.arkitekt.core.livedata

Types

DefaultValueLiveData
Link copied to clipboard
class DefaultValueLiveData<T : Any>(defaultValue: T) : MutableLiveData<T>
Extended LiveData class with default value.
DefaultValueMediatorLiveData
Link copied to clipboard
class DefaultValueMediatorLiveData<T : Any>(defaultValue: T) : MediatorLiveData<T>
Extended MediatorLiveData class with default value.
NonNullLiveData
Link copied to clipboard
class NonNullLiveData<T : Any>(initValue: T) : LiveData<T>
Immutable live data abstraction capable of mapping and preserving the non null value
UiData
Link copied to clipboard
class UiData<T : Any>(initValue: T) : MutableLiveData<T>
Mutable live data abstraction with non nullable value type.
UiDataMediator
Link copied to clipboard
class UiDataMediator<T : Any>(initValue: T) : MediatorLiveData<T>

Functions

combineLiveData
Link copied to clipboard
fun <T1, T2, RESULT> combineLiveData(t1: LiveData<T1>, t2: LiveData<T2>, callback: (T1, T2) -> RESULT): LiveData<RESULT>
fun <T1, T2, T3, RESULT> combineLiveData(t1: LiveData<T1>, t2: LiveData<T2>, t3: LiveData<T3>, callback: (T1, T2, T3) -> RESULT): LiveData<RESULT>
fun <T1, T2, T3, T4, RESULT> combineLiveData(t1: LiveData<T1>, t2: LiveData<T2>, t3: LiveData<T3>, t4: LiveData<T4>, callback: (T1, T2, T3, T4) -> RESULT): LiveData<RESULT>
fun <T1, T2, T3, T4, T5, RESULT> combineLiveData(t1: LiveData<T1>, t2: LiveData<T2>, t3: LiveData<T3>, t4: LiveData<T4>, t5: LiveData<T5>, callback: (T1, T2, T3, T4, T5) -> RESULT): LiveData<RESULT>
fun <T1, T2, T3, T4, T5, T6, RESULT> combineLiveData(t1: LiveData<T1>, t2: LiveData<T2>, t3: LiveData<T3>, t4: LiveData<T4>, t5: LiveData<T5>, t6: LiveData<T6>, callback: (T1, T2, T3, T4, T5, T6) -> RESULT): LiveData<RESULT>
fun <T1, T2, T3, T4, T5, T6, T7, RESULT> combineLiveData(t1: LiveData<T1>, t2: LiveData<T2>, t3: LiveData<T3>, t4: LiveData<T4>, t5: LiveData<T5>, t6: LiveData<T6>, t7: LiveData<T7>, callback: (T1, T2, T3, T4, T5, T6, T7) -> RESULT): LiveData<RESULT>
nonNull
Link copied to clipboard
fun <T : Any> LiveData<T>.nonNull(defaultValue: T): DefaultValueMediatorLiveData<T>
observe
Link copied to clipboard
fun <T> LiveData<T>.observe(lifecycleOwner: LifecycleOwner, callback: (T?) -> Unit)
observeNonNull
Link copied to clipboard
fun <T> LiveData<T>.observeNonNull(lifecycleOwner: LifecycleOwner, callback: (T) -> Unit)
toUiData
Link copied to clipboard
inline fun <T : Any> T.toUiData(): UiData<T>
Initialization extension function for UiData Usage: val myData: UiData<Int> = 1.
uiData
Link copied to clipboard
inline fun <T : Any> uiData(initValue: T): UiData<T>
Initialization function for UiData Usage: val myData: UiData<Int> = uiData(1)
inline fun <T : Any> uiData(initBlock: () -> T): UiData<T>
Initialization function for UiData Usage: val myData: UiData<Int> = uiData { 1 }