retainAll

fun retainAll(elements: IntArray): Boolean(source)
fun retainAll(elements: IntList): Boolean(source)

Keeps only elements in the MutableIntList and removes all other values.

Return

true if the MutableIntList has changed.