void removeAt(final int removeIndex){
  final Object[] items=this.items;
  if (removeIndex == takeIndex) {
    items[takeIndex]=null;
    takeIndex=inc(takeIndex);
    count--;
    if (itrs != null)     itrs.elementDequeued();
  }
 else {
    final int putIndex=this.putIndex;
    for (int i=removeIndex; ; ) {
      int next=inc(i);
      if (next != putIndex) {
        items[i]=items[next];
        i=next;
      }
 else {
        items[i]=null;
        this.putIndex=i;
        break;
      }
    }
    count--;
    if (itrs != null)     itrs.removedAt(removeIndex);
  }
  notFull.signal();
}

void removeAt ( final int removeIndex ) { final Object [ ] items = this . items ; if ( removeIndex == takeIndex ) { items [ takeIndex ] = null ; takeIndex = inc ( takeIndex ) ; count -- ; if ( itrs != null ) itrs . elementDequeued ( ) ; } else { final int putIndex = this . putIndex ; for ( int i = removeIndex ; ; ) { int next = inc ( i ) ; if ( next != putIndex ) { items [ i ] = items [ next ] ; i = next ; } else { items [ i ] = null ; this . putIndex = i ; break ; } } count -- ; if ( itrs != null ) itrs . removedAt ( removeIndex ) ; } notFull . signal ( ) ; }
deletes item at array index removeindex . utility for remove ( object ) and iterator . remove . call only when holding lock .
