Search code examples
javacollections

ConcurrentNavigableMap vs NavigableMap differences


There are some additions to the Java Collection Framework.

I tried to find out but I could not drill down what is actually the difference between:
NavigableMap vs ConcurrentNavigableMap.

Is it only, that ConcurrentNavigableMap can be modified by different threads?


Solution

  • The key difference is that ConcurrentNavigableMap provides the additional ConcurrentMap methods to NavigableMap as well as the additional concurrent usage semantics of ConcurrentMap.