identicalToOneOf

fun Any?.identicalToOneOf(vararg other: Any): Boolean

Checks whether any of the inputs in other fulfils referential equality (===).

Important: collections as input may lead to unexpected behaviour. Use the spread operator on arrays:

obj.identicalToOneOf(*arrayOf(Obj2, Obj3))

See also