摘要:
1 /*删除节点*/ 2 final Node<K,V> removeNode(int hash, Object key, Object value, 3 boolean matchValue, boolean movable) { 4 Node<K,V>[] tab; Node<K,V> p; i 阅读全文
摘要:
1 /*创建红黑树*/ 2 final void treeify(Node[] tab) { 3 TreeNode root = null;// 定义红黑树根节点root 4 for (TreeNode x = this, next; x != null; x = next) {// 循环,定义x:循环变量,代表当前节点、nex... 阅读全文
摘要:
1 /*树形化*/ 2 final void treeifyBin(Node<K,V>[] tab, int hash) { 3 int n, index; Node<K,V> e;// 定义n:节点数组长度、index:hash对应的数组下标、e:用于循环的迭代变量,代表当前节点 4 if (ta 阅读全文