What is the best way to calculate hash code based on values of these string in one pass?
With good I mean that it needs to be:
1 - fast: I need to get hash code for huge list (10^3..10^8 items) of short strings.
2 - identify the whole list of data so many list with maybe only couple of different strings must have different hash codes
How to do it in Java?
Maybe there is a way to use existing string hash code, but how to merge many hash codes calculated for separate strings?
Thank you.
hashCode()method on String which returns an int or, do you want hash values like MD5 digest?hashCode()method?Listimplementations that extendsAbstractListdo count its value from the hash codes of its elements.{"a", "b", "c"}be the same or different than the hash code for{"a", "c", "b"}?