code: @Override
    public boolean add(int element)
    {
      if (element < 0) {
        throw new IndexOutOfBoundsException("element < 0: " + element);
      }
      int index = findElementOrRemoved(element);
      if (index >= 0) {
        if (cells[index] == element) {
          return false;
        }
        freecells--;
      } else {
        index = -(index + 1);
      }
  
      modCount++;
      size++;
  
      // set the integer
      cells[index] = element;
  
      // do we need to rehash?
      if (1 - ((double) freecells / cells.length) > LOAD_FACTOR) {
        rehash();
      }
      return true;
    }
docs: Adds the specified element to this set if it is not already present.
  
  @param element element to be added to this set.
  
  @return <tt>true</tt> if the set did not already contain the specified
  element.