Kotlin HashSet minusAssign()
Syntax & Examples


Syntax of HashSet.minusAssign()

There are 4 variations for the syntax of HashSet.minusAssign() extension function. They are:

1.
operator fun <T> MutableCollection<in T>.minusAssign( element: T)

This extension function removes a single instance of the specified element from this mutable collection.

2.
operator fun <T> MutableCollection<in T>.minusAssign( elements: Iterable<T>)

This extension function removes all elements contained in the given elements collection from this mutable collection.

3.
operator fun <T> MutableCollection<in T>.minusAssign( elements: Array<T>)

This extension function removes all elements contained in the given elements array from this mutable collection.

4.
operator fun <T> MutableCollection<in T>.minusAssign( elements: Sequence<T>)

This extension function removes all elements contained in the given elements sequence from this mutable collection.