I wanted to use `Collection` for only single threaded environment and I am using a `HashMap` that is synchronized. 

However, I still doubt if it is thread safe to have it synchronized or not.
['https://Stackoverflow.com/questions/15152058', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/891556/']
For your needs, use `ConcurrentHashMap`. It allows concurrent modification of the Map from several threads without the need to block them. `Collections.synchronizedMap(map)` creates a blocking Map which will degrade performance, albeit ensure consistency
As its a single-threaded environment you can safely use HashMap.