Custom hashCode() and equals() objects make hashing work