Relative Content

Tag Archive for javahashmapconcurrenthashmap

Is ConcurrentHashMap needed, if I will only use get() method

I created an enum that includes 4 address formats. I know which country uses which format, and I’m trying to create a HashMap that will include countries as key, and formats as value. I want to get address format of a country with O(1) time complexity.