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
The commonly used `Collection` classes, such as `java.util.ArrayList`, are not synchronized. However, if there's a chance that two threads could be altering a collection concurrently, you can generate a synchronized collection from it using the `synchronizedCollection()` method. Similar to the read-only methods, the thread-safe APIs let you generate a synchronized collection, list, set, or map. For instance, this is how you can generate a synchronized map from a `HashMap`:

```
  Map map = Collections.synchronizedMap(new HashMap());
  map.put(...

```