removeAll

fun <E> MutableLiveData<List<E>>.removeAll(elements: Iterable<E>): Boolean

Removes all elements from this MutableLiveData that are also contained in the given elements collection. The observers are notified of the new value if the list was changed.

Return

true if any of the specified elements was removed from the collection, false if the MutableLiveData was not modified.


fun <E> MutableLiveData<List<E>>.removeAll(predicate: (E) -> Boolean): Boolean

Removes all elements from this MutableLiveData that match the given predicate. The observers are notified of the new value if the list was changed.

Return

true if any of the specified elements was removed from the collection, false if the MutableLiveData was not modified.