Java: Composite key in hashmaps
You could have a custom object containing the two strings: class StringKey { private String str1; private String str2; } Problem is, you need to determine the equality test and the hash code for two such objects. Equality could be the match on both strings and the hashcode could be the hashcode of the concatenated … Read more