Kotlin HashSet filterNotTo()
Syntax & Examples


Syntax of HashSet.filterNotTo()

The syntax of HashSet.filterNotTo() extension function is:

fun <T, C : MutableCollection<in T>> Iterable<T>.filterNotTo( destination: C, predicate: (T) -> Boolean ): C

This filterNotTo() extension function of HashSet appends all elements not matching the given predicate to the given destination.