Add equals and hashCode.