Kotlin HashSet plusAssign()
Syntax & Examples
Syntax of HashSet.plusAssign()
There are 4 variations for the syntax of HashSet.plusAssign() extension function. They are:
1.
operator fun <T> MutableCollection<in T>.plusAssign( element: T)
This extension function adds the specified element to this mutable collection.
2.
operator fun <T> MutableCollection<in T>.plusAssign( elements: Iterable<T>)
This extension function adds all elements of the given elements collection to this mutable collection.
3.
operator fun <T> MutableCollection<in T>.plusAssign( elements: Array<T>)
This extension function adds all elements of the given elements array to this mutable collection.
4.
operator fun <T> MutableCollection<in T>.plusAssign( elements: Sequence<T>)
This extension function adds all elements of the given elements sequence to this mutable collection.