1. 导读
本章节面相的是对红黑树有了解的读者, 因为JAVA引入了黑红树, 所以后面的内容中主要围绕着红黑树来展开;
.1 get
.2 find
2. get
HashMap::get返回一个数据节点, 如果不存在则返回空;
final Node<K,V> getNode(int hash, Object key) {
Node<K,V>[] tab; Node<K,V> first, e; int n; K k;
if ((tab = table) != null && (n = tab.length) > 0 &&
(first = tab[(n - 1) & hash]) != null) {
if (first.hash == hash && // always check first node
((k = first.key) == key || (key != null && key.equals(k))))
return first;
if ((e = first.next) != null) {
if (first instanceof TreeNode)
return ((TreeNode