Kotlin HashMap filterTo()
Syntax & Examples
Syntax of HashMap.filterTo()
The syntax of HashMap.filterTo() extension function is:
fun <K, V, M : MutableMap<in K, in V>> Map<out K, V>.filterTo( destination: M, predicate: (Entry<K, V>) -> Boolean ): M
This filterTo() extension function of HashMap appends all entries matching the given predicate into the mutable map given as destination parameter.