It seems that the name attribute is the only field that determines the equality value of the CustomType. This makes the euqlas and hashCode implementation simple.