ListLiveData<D> extension

Extension methods for LiveData containing collections.

on

Properties

isEmpty → bool

Available on LiveData<Iterable<D>>, provided by the ListLiveData extension

Whether the current collection is empty.
no setter
isNotEmpty → bool

Available on LiveData<Iterable<D>>, provided by the ListLiveData extension

Whether the current collection is not empty.
no setter
length → int

Available on LiveData<Iterable<D>>, provided by the ListLiveData extension

The number of elements in the current collection.
no setter

Methods

expand<T>(Iterable<T> toElements(D element)) → Iterable<T>

Available on LiveData<Iterable<D>>, provided by the ListLiveData extension

Expands each element into zero or more elements.
filtered(bool check(D value)) → LiveData<Iterable<D>>

Available on LiveData<Iterable<D>>, provided by the ListLiveData extension

Creates a LiveData that filters elements based on a condition.
forEach(void action(D element)) → void

Available on LiveData<Iterable<D>>, provided by the ListLiveData extension

Applies a function to each element.
map<T>(T toElement(D value)) → Iterable<T>

Available on LiveData<Iterable<D>>, provided by the ListLiveData extension

Maps each element to a new value.
notNull() → LiveData<Iterable<D>>

Available on LiveData<Iterable<D>>, provided by the ListLiveData extension

Creates a LiveData that filters out null elements.