hashCode has to be implemented by derived classes