Nothing wrong with using class. If I remember correctly, this sort of thing ought to work:-
checking the actual class name, and not using instanceof, but this does not seem like an elegant solution.
Originally posted by Stan James:
I didn't follow those links today, but I recall from prior pondering that it seems unwise (a nice word for wrong) to ever have two objects of different classes equals().