removeAll

inline fun <T> MutableIterable<T>.removeAll(elementsToRemove: Collection<T>): Boolean(source)

Removes, from an iterable, every element that belongs to the provided collection.

This method calls MutableCollection.removeAll if this is a collection, and Iterators.removeAll otherwise.

Return

true if any element was removed from this

See also

Parameters

elementsToRemove

the elements to remove


inline fun <T> MutableIterator<T>.removeAll(elementsToRemove: Collection<T>): Boolean(source)

Traverses an iterator and removes every element that belongs to the provided collection. The iterator will be left exhausted: its hasNext method will return false.

Return

true if any element was removed from this

See also

Parameters

elementsToRemove

the elements to remove