code: void removeAt(final int removeIndex) {
          // assert lock.getHoldCount() == 1;
          // assert items[removeIndex] != null;
          // assert removeIndex >= 0 && removeIndex < items.length;
          final Object[] items = this.items;
          if (removeIndex == takeIndex) {
              // removing front item; just advance
              items[takeIndex] = null;
              if (++takeIndex == items.length) takeIndex = 0;
              count--;
              if (itrs != null)
                  itrs.elementDequeued();
          } else {
              // an "interior" remove
  
              // slide over all others up through putIndex.
              for (int i = removeIndex, putIndex = this.putIndex;;) {
                  int pred = i;
                  if (++i == items.length) i = 0;
                  if (i == putIndex) {
                      items[pred] = null;
                      this.putIndex = pred;
                      break;
                  }
                  items[pred] = items[i];
              }
              count--;
              if (itrs != null)
                  itrs.removedAt(removeIndex);
          }
          notFull.signal();
      }
docs: Deletes item at array index removeIndex.
  Utility for remove(Object) and iterator.remove.
  Call only when holding lock.