retainAll

open override fun retainAll(elements: Collection<E>): Boolean

Retains only the elements in the set that are contained in the specified collection. This operation is synchronized.

Return

true if the set was modified as a result of the call.

Parameters

elements

The collection containing elements to be retained in the set.