MirroredMapMutableLiveData

Constructors

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun setValue(value: MirroredMap<K, V>?)

Inherited functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun hasObservers(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun postValue(p0: MirroredMap<K, V>)
Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
@IviExperimental(reasons = [])
fun <P : IviPagingSource<E>, E : Any> LiveData<P>.first(timeout: Duration = Duration.ZERO): LiveData<E>

Transforms this IviPagingSource to a E with only the first element from the IviPagingSource. If the returned LiveData becomes inactive while values are still being emitted, the underlying coroutine will be cancelled after the timeout, unless the LiveData becomes active again before that timeout. By default, timeout is Duration.ZERO, which means that once the returned LiveData becomes inactive it is not usable anymore.

Link copied to clipboard
@IviExperimental(reasons = [])
fun <P : IviPagingSource<E>, E : Any> LiveData<P>.isEmpty(timeout: Duration = Duration.ZERO): LiveData<Boolean>

Transforms this IviPagingSource to a Boolean indicating whether the IviPagingSource does not contain any element. If the returned LiveData becomes inactive while values are still being emitted, the underlying coroutine will be cancelled after the timeout, unless the LiveData becomes active again before that timeout. By default, timeout is Duration.ZERO, which means that once the returned LiveData becomes inactive it is not usable anymore.

Link copied to clipboard
@IviExperimental(reasons = [])
fun <D : IviDataSource<E, Q>, E : Any, Q : Any> LiveData<D>.mapQuery(query: Q, timeout: Duration = Duration.ZERO): LiveData<IviPagingSource<E>>

Transforms this IviDataSource to a IviPagingSource for a given query. If the returned LiveData becomes inactive while values are still being emitted, the underlying coroutine will be cancelled after the timeout, unless the LiveData becomes active again before that timeout. By default, timeout is Duration.ZERO, which means that once the returned LiveData becomes inactive it is not usable anymore.

@IviExperimental(reasons = [])
fun <D : IviDataSource<E, Q>, E : Any, Q : Any, R> LiveData<D>.mapQuery(query: Q, timeout: Duration = Duration.ZERO, transformation: suspend (PageProvider<E>) -> R): LiveData<R>

Transforms this IviDataSource to a LiveData of type R for a given query and a given transformation. If the returned LiveData becomes inactive while values are still being emitted, the underlying coroutine will be cancelled after the timeout, unless the LiveData becomes active again before that timeout. By default, timeout is Duration.ZERO, which means that once the returned LiveData becomes inactive it is not usable anymore.

Link copied to clipboard
@IviExperimental(reasons = [])
fun <P : IviPagingSource<E>, E : Any> LiveData<P>.toList(timeout: Duration = Duration.ZERO): LiveData<List<E>>

Transforms this IviPagingSource to a List containing elements of type E with all elements from the IviPagingSource. If the returned LiveData becomes inactive while values are still being emitted, the underlying coroutine will be cancelled after the timeout, unless the LiveData becomes active again before that timeout. By default, timeout is Duration.ZERO, which means that once the returned LiveData becomes inactive it is not usable anymore.