code: protected E removeKey (Comparable<?> key)
      {
          // don't fail, but generate a warning if we're passed a null key
          if (key == null) {
              log.warning("Requested to remove null key.", new Exception());
              return null;
          }
  
          // look up this entry's position in our set
          int eidx = ArrayUtil.binarySearch(
              _entries, 0, _size, new SimpleEntry<Comparable<?>>(key), ENTRY_COMP);
  
          // if we found it, remove it
          if (eidx >= 0) {
              // extract the old entry
              E oldEntry = _entries[eidx];
              _size--;
              if ((_entries.length > INITIAL_CAPACITY) && (_size < _entries.length/8)) {
                  // if we're using less than 1/8 of our capacity, shrink by half
                  @SuppressWarnings("unchecked") E[] newEnts = (E[])new Entry[_entries.length/2];
                  System.arraycopy(_entries, 0, newEnts, 0, eidx);
                  System.arraycopy(_entries, eidx+1, newEnts, eidx, _size-eidx);
                  _entries = newEnts;
  
              } else {
                  // shift entries past the removed one downwards
                  System.arraycopy(_entries, eidx+1, _entries, eidx, _size-eidx);
                  _entries[_size] = null;
              }
              _modCount++;
              return oldEntry;
  
          } else {
              return null;
          }
      }
docs: Removes from the set the entry whose key matches the supplied key. This should not be called
  directly, instead the associated <code>removeFrom{Set}()</code> method should be called on
  the distributed object that contains the set in question.
  
  @return the old matching entry if found and removed, null if not found.