I see that a ConcurrentHashMap stores its (key, value) pairs in a list of Node
. However, a Node
can also be organised as a TreeBin
.
So the underlying data structure of a ConcurrentHashMap is a list which has elements that are either standalone or trees.
Why isn't the data structure either a list or a tree?
What is the usefulness of this more complicated implementation?