docs: @Override
    public void add(ApiType obj) {
      String key = keyFunc.apply(obj);
      lock.lock();
      try {
        ApiType oldObj = this.items.get(key);
        this.items.put(key, obj);
        this.updateIndices(oldObj, obj, key);
      } finally {
        lock.unlock();
      }
    }