Of course, depending on the contents of your class, the comparison may be more or less complex, and you don't necessarily need to compare ALL the fields. If a record is a "person", then "social security number" or similar may be the component that says two persons are the same [obviously, that would have to be checked elsewhere that two different persons aren't entered with the same number]. Or a car-registration number for a car, serial number for a computer, etc.

[1] lhs stands for Left Hand Side and rhs stands for Right Hand Side, and corresponds to the left and right hand side operands to the == operator.