public static <TNode extends AvlLinkedNode> TNode appendList(TNode head, TNode otherHead) {
      if (head == null) return otherHead;
      if (otherHead == null) return head;

      TNode tail = (TNode) head.iterPrev;
      TNode otherTail = (TNode) otherHead.iterPrev;
      tail.iterNext = otherHead;
      otherHead.iterPrev = tail;
      otherTail.iterNext = head;
      head.iterPrev = otherTail;
      return head;
    }
Append a list of nodes to the tree
@param head      the head of the current linked list
@param otherHead the head of the list to append to the current list
@return the new head of the current list
hbase-common/src/main/java/org/apache/hadoop/hbase/util/AvlUtil.java