How do I calculate a good hash code for a list of strings?

后端 未结 11 1598
我寻月下人不归
我寻月下人不归 2020-12-01 02:34

Background:

  • I have a short list of strings.
  • The number of strings is not always the same, but are nearly always of the order of a “handful”
  • I
11条回答
  •  一个人的身影
    2020-12-01 03:17

    You can use the following method to aggregate hash codes: http://docs.oracle.com/javase/7/docs/api/java/util/Objects.html#hash(java.lang.Object...)

提交回复
热议问题