ListLiveData<D> extension
Extension methods for LiveData containing collections.
Properties
- isEmpty → bool
-
Available on LiveData<
Whether the current collection is empty.Iterable< , provided by the ListLiveData extensionD> >no setter - isNotEmpty → bool
-
Available on LiveData<
Whether the current collection is not empty.Iterable< , provided by the ListLiveData extensionD> >no setter - length → int
-
Available on LiveData<
The number of elements in the current collection.Iterable< , provided by the ListLiveData extensionD> >no setter
Methods
-
expand<
T> (Iterable< T> toElements(D element)) → Iterable<T> -
Available on LiveData<
Expands each element into zero or more elements.Iterable< , provided by the ListLiveData extensionD> > -
filtered(
bool check(D value)) → LiveData< Iterable< D> > -
Available on LiveData<
Creates a LiveData that filters elements based on a condition.Iterable< , provided by the ListLiveData extensionD> > -
forEach(
void action(D element)) → void -
Available on LiveData<
Applies a function to each element.Iterable< , provided by the ListLiveData extensionD> > -
map<
T> (T toElement(D value)) → Iterable< T> -
Available on LiveData<
Maps each element to a new value.Iterable< , provided by the ListLiveData extensionD> > -
notNull(
) → LiveData< Iterable< D> > -
Available on LiveData<
Creates a LiveData that filters out null elements.Iterable< , provided by the ListLiveData extensionD> >