intersect
Returns a set containing elements of this array that are also contained in the specified other array.
The returned set preserves the element iteration order of the original array.
The returned set uses structural equality (==) to distinguish elements, meaning there will be no two structurally equal, but otherwise different elements in it.
To get a set containing all elements that are contained at least in one of these collections use union.
Since Kotlin
1.0Returns a set containing elements of this collection that are also contained in the specified other collection.
The returned set preserves the element iteration order of the original collection.
The returned set uses structural equality (==) to distinguish elements, meaning there will be no two structurally equal, but otherwise different elements in it.
To get a set containing all elements that are contained at least in one of these collections use union.