equalsOneOf

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

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

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

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

See also