Add the option to use getClass instead of instanceof in the equals
method