EqualsAndHashcode implementation.