I have a range of objects that have a long
field whose value uniquely identifies a particular object across my entire system, much like a GUID. I have overriden
You have understood the purpose of hashCode
correctly. Yes, an uniform distribution is desirable (although not an actual requirement).
I would suggest ((id >> 32) ^ id)
.
The above expression: