Kotlin HashSet minus()
Syntax & Examples
Syntax of HashSet.minus()
There are 8 variations for the syntax of HashSet.minus() extension function. They are:
operator fun <T> Iterable<T>.minus(element: T): List<T>
This extension function returns a list containing all elements of the original collection without the first occurrence of the given element.
operator fun <T> Iterable<T>.minus( elements: Array<out T> ): List<T>
This extension function returns a list containing all elements of the original collection except the elements contained in the given elements array.
operator fun <T> Iterable<T>.minus( elements: Iterable<T> ): List<T>
This extension function returns a list containing all elements of the original collection except the elements contained in the given elements collection.
operator fun <T> Iterable<T>.minus( elements: Sequence<T> ): List<T>
This extension function returns a list containing all elements of the original collection except the elements contained in the given elements sequence.
operator fun <T> Set<T>.minus(element: T): Set<T>
This extension function returns a set containing all elements of the original set except the given element.
operator fun <T> Set<T>.minus(elements: Array<out T>): Set<T>
This extension function returns a set containing all elements of the original set except the elements contained in the given elements array.
operator fun <T> Set<T>.minus(elements: Iterable<T>): Set<T>
This extension function returns a set containing all elements of the original set except the elements contained in the given elements collection.
operator fun <T> Set<T>.minus(elements: Sequence<T>): Set<T>
This extension function returns a set containing all elements of the original set except the elements contained in the given elements sequence.