identityHashSetOf

Creates a mutable set backed by an IdentityHashMap. This set uses identity comparisons === to determine equality of elements, rather than the equals method.

Return

A new empty mutable identity hash set.


fun <T> identityHashSetOf(vararg elements: T): MutableSet<T>

Creates a mutable set backed by an IdentityHashMap, initialized with the provided elements. This set uses identity comparisons (===) to determine equality of elements, rather than the equals method.

Return

A new mutable identity hash set containing the provided elements.

Parameters

elements

Zero or more elements to initialize the set with.