reuse code from integer strategy for hashcode