private void linkInPlace ( Node < K , V > orphan , Node < K , V > n ) { // link orphan at node's position orphan . y_s = n . y_s ; if ( n . y_s != null ) { n . y_s . o_s = orphan ; } orphan . o_s = n . o_s ; if ( n . o_s != null ) { if ( n . o_s . o_c == n ) { // node is the oldest :( n . o_s . o_c = orphan ; } else { // node has an older sibling! n . o_s . y_s = orphan ; } } n . o_s = null ; n . y_s = null ; }
Put an orphan node into the position of another node . The other node becomes an orphan .