code: public final void addChildBefore(Node newChild, Node node) {
      checkArgument(node.parent == this, "The existing child node of the parent should not be null.");
      checkArgument(newChild.next == null, "The new child node has next siblings.");
      checkArgument(newChild.previous == null, "The new child node has previous siblings.");
      checkArgument(newChild.parent == null, "The new child node already has a parent.");
      if (first == node) {
        Node last = first.previous;
        // NOTE: last.next remains null
        newChild.parent = this;
        newChild.next = first;
        newChild.previous = last;
        first.previous = newChild;
        first = newChild;
      } else {
        addChildAfter(newChild, node.previous);
      }
    }
docs: Add 'child' before 'node'.