code: public boolean add() {
          if (root == NIL) {
              root = nodeAllocator.newNode();
              copy(root);
              fixAggregates(root);
              return true;
          } else {
              int node = root; assert parent(root) == NIL;
              int parent;
              int cmp;
              do {
                  cmp = compare(node);
                  if (cmp < 0) {
                      parent = node;
                      node = left(node);
                  } else if (cmp > 0) {
                      parent = node;
                      node = right(node);
                  } else {
                      merge(node);
                      return false;
                  }
              } while (node != NIL);
  
              node = nodeAllocator.newNode();
              if (node >= capacity()) {
                  resize(oversize(node + 1));
              }
              copy(node);
              parent(node, parent);
              if (cmp < 0) {
                  left(parent, node);
              } else {
                  assert cmp > 0;
                  right(parent, node);
              }
  
              rebalance(node);
  
              return true;
          }
      }
docs: Add current data to the tree and return <tt>true</tt> if a new node was added
  to the tree or <tt>false</tt> if the node was merged into an existing node.