docs: public synchronized void addElement(T element) {
      checkArgument(
          element.getNext() == null && element.getPrev() == null && element != head,
          "Element already in a list.");
      size++;
      if (head == null) {
        head = element;
      } else {
        head.setPrev(element);
        element.setNext(head);
        head = element;
      }
    }