@Override
public boolean equals (final Object object) {
- if (null == object) {
+ if (this == object) {
+ return true;
+ } else if (null == object) {
return false;
} else if (this.getClass() != object.getClass()) {
return false;
}
- final CountryData other = (CountryData) object;
+ final Country other = (Country) object;
- return Objects.equals(this.getCountryCode(), other.getCountryCode());
+ if (!Objects.equals(this.getCountryCode(), other.getCountryCode())) {
+ return false;
+ } else if (!Objects.equals(this.getCountryI18nkey(), other.getCountryI18nkey())) {
+ return false;
+ } else if (!Objects.equals(this.getCountryId(), other.getCountryId())) {
+ return false;
+ }
+
+ return true;
}
@Override
public int hashCode () {
- int hash = 5;
- hash = 37 * hash + Objects.hashCode(this.getCountryCode());
+ int hash = 7;
+ hash = 41 * hash + Objects.hashCode(this.getCountryCode());
+ hash = 41 * hash + Objects.hashCode(this.getCountryI18nkey());
+ hash = 41 * hash + Objects.hashCode(this.getCountryId());
return hash;
}