code: protected boolean add (E elem)
      {
          // determine where we'll be adding the new element
          int eidx = ArrayUtil.binarySearch(_entries, 0, _size, elem, ENTRY_COMP);
  
          // if the element is already in the set, bail now
          if (eidx >= 0) {
              log.warning("Refusing to add duplicate entry", "entry", elem, "set", this,
                          new Exception());
              return false;
          }
  
          // convert the index into happy positive land
          eidx = (eidx+1)*-1;
  
          // expand our entries array if necessary
          int elength = _entries.length;
          if (_size >= elength) {
              // sanity check
              if (elength > getWarningSize()) {
                  log.warning("Requested to expand to questionably large size", "l", elength,
                              new Exception());
              }
  
              // create a new array and copy our data into it
              @SuppressWarnings("unchecked") E[] elems = (E[])new Entry[elength*2];
              System.arraycopy(_entries, 0, elems, 0, elength);
              _entries = elems;
          }
  
          // if the entry doesn't go at the end, shift the elements down to accomodate it
          if (eidx < _size) {
              System.arraycopy(_entries, eidx, _entries, eidx+1, _size-eidx);
          }
  
          // stuff the entry into the array and note that we're bigger
          _entries[eidx] = elem;
          _size++;
          _modCount++;
  
          return true;
      }
docs: Adds the specified entry to the set. This should not be called directly, instead the
  associated <code>addTo{Set}()</code> method should be called on the distributed object that
  contains the set in question.
  
  @return true if the entry was added, false if it was already in the set.