I remember eclipse and idea have this template to automatically create an object\'s hashCode based on its attributes.
One of the strategies if a number and a string is u
You can also use Objects class from java.util.Objects package to quickly get hash code.
Objects
java.util.Objects
@Override public int hashCode() { return Objects.hash(this.string, this.integerValue, this.otherDataTypes); }