equals

fun equals(a: Any?, b: Any?): Boolean

Returns {@code true} if the arguments are equal to each other and {@code false} otherwise. Consequently, if both arguments are {@code null}, {@code true} is returned. Otherwise, if the first argument is not {@code null}, equality is determined by calling the {@code equals} method of the first argument with the second argument as a parameter.

Return

{@code true} if the arguments are equal to each other and {@code false} otherwise

Parameters

a

an object

b

an object to be compared with {@code a} for equality

See also

Object.equals