Removes the first 'total' elements from the queue. Element 'total' will be the new start of the queue

@param total Number of elements to remove from the head of the queue
771122
public void removeHead( int total ) {
		for( int j = total; j < size; j++ ) {
			data[j-total] = data[j];
		}
		size -= total;
	}
1205153
@Override
	public boolean removeAll(Collection<?> c) {
		boolean b = queue.removeAll(c);
		if (b){
			signalSizeReduced();
		}
		return b;
	}
238715
public void discard(int count) {
    assert elementsCount >= count;

    elementsCount -= count;
    /* #if ($TemplateOptions.KTypeGeneric) */
    Arrays.fill(buffer, elementsCount, elementsCount + count, null);
    /* #end */
  }
478737
public void removeElementAt(int i)
  {

    if (null == m_map)
      return;
      
    if (i >= m_firstFree)
      throw new ArrayIndexOutOfBoundsException(i + " >= " + m_firstFree);
    else if (i < 0)
      throw new ArrayIndexOutOfBoundsException(i);

    if (i < m_firstFree - 1)
      System.arraycopy(m_map, i + 1, m_map, i, m_firstFree - i - 1);

    m_firstFree--;
    m_map[m_firstFree] = null;
  }
481658
def remove(self, first, count):
        

        # Avoid trivialities
        if first < 0 or count < 1:
            return

        new_range = []
        last = first + count - 1
        for r in self.__range:
            if first <= r.last and r.first <= last:
                # There is an overlap
                if r.first < first:
                    new_range.append(IdRange(r.first, first-r.first))
                if last < r.last:
                    new_range.append(IdRange(last+1, r.last-last))
            else:
                # No overlap, range is kept
                new_range.append(r)

        self.__range = new_range
572612
public synchronized void removeLeastUsedElements()
    {    
        int rows = this.removePercent / 100 *  this.length;
        rows     = rows == 0 ? 1 : rows;
        
        while(rows > 0 && this.length > 0) {
            // remove the last element
            Entry<E, T> entry = this.tail.prev;
            
            this.tail.prev = entry.prev;
            entry.prev.next = this.tail;
            map.remove(entry.key);
            this.length--;
            rows--;
        }
    }
663829
public void clear() {
		final int arrayOffset = getHeadElementIndex();
		Arrays.fill(queue, arrayOffset, arrayOffset + size, null);
		size = 0;
	}
899348
public void addToTail(QueueElement qe) {

		checkElementFree(qe);
		if (head == null) {
			head = qe;
			tail = qe;
			qe.queue = this;
		} else {
			qe.previous = tail;
			qe.next = null;
			tail.next = qe;
			tail = qe;
		}

		qe.queue = this;
		numElements++;

	}
1266919
function( element, queueLength, count ) {
		var queue = element.queue();

		if ( queueLength > 1 ) {
			queue.splice.apply( queue,
				[ 1, 0 ].concat( queue.splice( queueLength, count ) ) );
		}
		element.dequeue();
	}
620650
public void clear(F element) {
        Counter<S> s = maps.get(element);
        if (s != null)
            s.clear();
    }
1197511
public void removeLRU() {
        int removeCount = (int) Math.max((size() * trimFactor), 1);

        while ((removeCount--) > 0) {
            removeEntry(head.next);
        }
    }
41927
@Override
    public boolean remove(Object o) {

        for (;;) {
            final long head = this.head.sum();
            // we are optimistically advancing the head by one
            // if the object does not exist we have to put it back
            if (headCursor.compareAndSet(head, head + 1)) {
                for (;;) {
                    final long tail = this.tail.sum();
                    if (tailCursor.compareAndSet(tail, tail + 1)) {
                        // number removed
                        int n = 0;

                        // just blocked access to the entire queue - go for it
                        for (int i = 0; i < size(); i++) {
                            final int slot = (int) ((this.head.sum() + i) & mask);
                            if (buffer[slot] != null && buffer[slot].equals(o)) {
                                n++;

                                for (int j = i; j > 0; j--) {
                                    final int cSlot = (int) ((this.head.sum() + j - 1) & mask);
                                    final int nextSlot = (int) ((this.head.sum() + j) & mask);
                                    // overwrite ith element with previous
                                    buffer[nextSlot] = buffer[cSlot];
                                }
                            }
                        }

                        if (n > 0) {
                            // head is advanced once for each
                            headCursor.set(head + n);

                            // undo the change to tail state - this was only
                            // done to block others from changing
                            tailCursor.set(tail);
                            // tail is unchanged
                            this.head.add(n);


                            // queue is not full now
                            queueNotFullCondition.signal();
                            return true;


                        } else {
                            // no change to the queue - unblock others
                            tailCursor.set(tail);
                            headCursor.set(head);
                            return false;
                        }
                    }
                }
            }
        }
    }
53772
public AbstractJournalOperation removeFirst()
    {
        AbstractJournalOperation op = head;
        if (op == null)
            throw new NoSuchElementException();
        
        head = op.next();
        if (head == null)
            tail = null;
        op.setNext(null);
        size--;
        
        return op;
    }
79774
public boolean remove(final T element) {
    for (int i = 0; i < this.size; i++)
      if (this.elements[i].equals(element)) {
        System.arraycopy(this.elements, i + 1, this.elements, i, this.size - (i + 1));
        this.size--;
        return true;
      }
    return false;
  }
37338
private void removeTrail() {
        int last = this.size - 1;
        while (last >= 0 && this.arr[last] == this.blankElement) {
            last--;
        }
        this.size = last + 1;
    }
68186
public void removeNode(int n)
  {

    if (!m_mutable)
      throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!");

    this.removeElement(n);
  }
1232167
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();
    }