small code refactor: use Objects#hash to calculate hashCode