According to this post:
http://coding-geek.com/how-does-a-hashmap-work-in-java/
java 8 hashmaps use a treenode instead of a linkedlist (as in java 7) as elements of the array.
TreeNodes have the special property of acting as a linkedlist if the number of elements are small, and acting as a red black tree if there is a large number of elements. (Since operations involving a red black tree are log(n)).
However, doesn't this require the key to be Comparable or some ordering of the keys to exist?
Is this enforced in the java 8 hashmap? Will it only use red black trees if the keys are Comparable (ordering of keys exist)?