code: public final void detachChildren() {
      for (Node child = first; child != null;) {
        Node nextChild = child.next;
        child.parent = null;
        child.next = null;
        child.previous = null;
        child = nextChild;
      }
      first = null;
    }
docs: Removes all children from this node and isolates the children from each
  other.