code: protected void rehash (int ncount)
      {
          int[] obuckets = _buckets;
          createBuckets(ncount);
  
          for (int idx = 0, pos = 0; pos < _size; idx++) {
              int value = obuckets[idx];
              if (value != _sentinel) {
                  readd(value);
                  pos++;
              }
          }
      }
docs: Recreates the bucket array with the specified new count.