code: @Override
    public boolean add(T object) {
      Preconditions.checkNotNull(object, "object");
  
      // Locking this object protects against removing the exact object, but does not protect against
      // removing a distinct, but equivalent object.
      synchronized (object) {
        // add() will atomically add the object to the index, if it doesn't exist.
        if (!mPrimaryIndex.add(object)) {
          // This object is already added, possibly by another concurrent thread.
          return false;
        }
  
        for (FieldIndex<T, ?> fieldIndex : mIndices.values()) {
          fieldIndex.add(object);
        }
      }
      return true;
    }
docs: Adds an object o to the set if there is no other object o2 such that
  {@code (o == null ? o2 == null : o.equals(o2))}. If this set already contains the object, the
  call leaves the set unchanged.
  
  @param object the object to add
  @return true if this set did not already contain the specified element