code: private void transfer(AtomicReferenceArray src, ResizeContainer resizeContainer)
      {
          AtomicReferenceArray dest = resizeContainer.nextArray;
  
          for (int j = 0; j < src.length() - 1; )
          {
              Object o = src.get(j);
              if (o == null)
              {
                  if (src.compareAndSet(j, null, RESIZED))
                  {
                      j++;
                  }
              }
              else if (o == RESIZED || o == RESIZING)
              {
                  j = (j & ~(ResizeContainer.QUEUE_INCREMENT - 1)) + ResizeContainer.QUEUE_INCREMENT;
                  if (resizeContainer.resizers.get() == 1)
                  {
                      break;
                  }
              }
              else
              {
                  Entry<K, V> e = (Entry<K, V>) o;
                  if (src.compareAndSet(j, o, RESIZING))
                  {
                      while (e != null)
                      {
                          this.unconditionalCopy(dest, e);
                          e = e.getNext();
                      }
                      src.set(j, RESIZED);
                      j++;
                  }
              }
          }
          resizeContainer.decrementResizerAndNotify();
          resizeContainer.waitForAllResizers();
      }
docs: /*
  Transfer all entries from src to dest tables