equals
Indicates whether some other object is "equal to" this Optional. The other object is considered equal if:
it is also an
Optionaland;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