equals

open operator override fun equals(obj: Any?): Boolean

Indicates whether some other object is "equal to" this Optional. The other object is considered equal if:

  • it is also an Optional and;

  • both instances have no value present or;

  • the present values are "equal to" each other via equals().

Return

true if the other object is "equal to" this object otherwise false

Parameters

obj

an object to be tested for equality