I have an object with a String that holds a unique id . (such as \"ocx7gf\" or \"67hfs8\") I need to supply it an implementation of int hascode() which will be unique obvio
Looks like you've got a base-36 number there (a-z + 0-9). Why not convert it to an int using Integer.parseInt(s, 36)? Obviously, if there are too many unique IDs, it won't fit into an int, but in that case you're out of luck with unique integers and will need to get by using String.hashCode(), which does its best to be close to unique.