equals
equals(obj)
Determines whether this instance and a specified object, which must also be a Unit object, have the same value.
| Parameter | Description |
|---|---|
| obj | The Unit to compare to this instance. |
Returns: true if obj is a Unit and its value is the same as this instance; otherwise, false. If obj is null, the method returns false.