I have a Long and a String. I want to create a hash of both of those object. Meaning, I want some function that will take arbitrary number of objects and return me one hash value. Does such a function exits?
Something like this:
public int getHash(Object... objects)
{
//somehow returns a hash of all these objects
}
Take a look at
Arrays.hashCode(Object[]).It doesn’t accept varargs, but you can wrap it with your own varargs library function if you wish: