retain All
Removes, from an iterable, every element that does not belong to the provided collection.
This method calls MutableCollection.retainAll if this is a collection, and Iterators.retainAll otherwise.
Return
true if any element was removed from this
See also
Parameters
elements To Retain
the elements to retain
Traverses an iterator and removes every element that does not belong 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
elements To Retain
the elements to retain