equals(): added condition to check if the argument is a reference to this object.