equals

abstract operator override fun equals(other: Any?): Boolean

{@inheritDoc}

This comparison operation takes an Object as its argument to avoid accidentally calling this with, say, a String literal. We mark it as deprecated to ensure we don't accidentally invoke this method when we really mean the version that takes an AvailObject as an argument. Eclipse conveniently shows such invocations with a strike-out. That's a convenient warning for the programmer, but we also fail if this method actually gets invoked AND the argument is not an AvailObject. That means we don't allow AvailObjects to be added to Java sets and such, at least when they're intermixed with things that are not AvailObjects.


abstract fun equals(another: A_BasicObject): Boolean

Answer whether the receiver and the argument, both A_BasicObjects, are equal in value.

Note that the argument is of type AvailObject so that correctly typed uses (where the argument is statically known to be an AvailObject) proceed normally. Incorrectly typed uses (where the argument is an arbitrary Java Object should show up as calling a deprecated method, and should fail at runtime if the argument is not actually an AvailObject.

Return

true if the two objects are of equal value, false otherwise.

Parameters

another

The object to be compared to the receiver.