Generated equals and hashcode implementation