Kotlin HashMap minus()
Syntax & Examples
Syntax of HashMap.minus()
There are 4 variations for the syntax of HashMap.minus() extension function. They are:
1.
operator fun <K, V> Map<out K, V>.minus(key: K): Map<K, V>
This extension function returns a map containing all entries of the original map except the entry with the given key.
2.
operator fun <K, V> Map<out K, V>.minus( keys: Iterable<K> ): Map<K, V>
This extension function returns a map containing all entries of the original map except those entries the keys of which are contained in the given keys collection.
3.
operator fun <K, V> Map<out K, V>.minus( keys: Array<out K> ): Map<K, V>
This extension function returns a map containing all entries of the original map except those entries the keys of which are contained in the given keys array.
4.
operator fun <K, V> Map<out K, V>.minus( keys: Sequence<K> ): Map<K, V>
This extension function returns a map containing all entries of the original map except those entries the keys of which are contained in the given keys sequence.