Removes and returns the item at the head of this circular buffer (if any).
@return the item just removed or {@code null} if this circular buffer is empty.
334940
public T read () {
		if (size > 0) {
			size--;
			T item = items[head];
			items[head] = null; // Avoid keeping useless references
			if (++head == items.length) head = 0;
			return item;
		}

		return null;
	}
42152
public ObjectSinkNode removeFirst() {
        if ( this.firstNode == null ) {
            return null;
        }
        final ObjectSinkNode node = this.firstNode;
        this.firstNode = node.getNextObjectSinkNode();
        node.setNextObjectSinkNode( null );
        if ( this.firstNode != null ) {
            this.firstNode.setPreviousObjectSinkNode( null );
        } else {
            this.lastNode = null;
        }
        this.size--;
        return node;
    }
18314
public ItemsSketch<T> getResultAndReset() {
    if (gadget_ == null) { return null; } //Intentionally return null here for speed.
    final ItemsSketch<T> hqs = gadget_;
    gadget_ = null;
    return hqs;
  }
653022
public Node removeLast()
    {
        Node node = header.getPreviousNode();
        lastByte -= node.ba.last();
        return removeNode( node );
    }
182781
@Override
    public T remove() {

        T retrievedElement = poll();

        if (retrievedElement == null) {
            throw new NoSuchElementException();
        }

        return retrievedElement;
    }
596512
public synchronized T get ()
    {
        while (_count == 0) {
            try { wait(); } catch (InterruptedException e) {}
        }

        // pull the object off, and clear our reference to it
        T retval = _items[_start];
        _items[_start] = null;

        _start = (_start + 1) % _size;
        _count--;

        // if we are only filling 1/8th of the space, shrink by half
        if ((_size > MIN_SHRINK_SIZE) && (_size > _suggestedSize) &&
            (_count < (_size >> 3))) shrink();

        return retval;
    }
165910
public T pollFirst() {
    if (head == null) {
      return null;
    }
    T first = head.element;
    this.remove(first);
    return first;
  }
928868
private E dequeue() {
        // assert takeLock.isHeldByCurrentThread();
        // assert head.item == null;
        Node<E> h = head;
        Node<E> first = h.next;
        h.next = sentinel(); // help GC
        head = first;
        E x = first.item;
        first.item = null;
        return x;
    }
713977
public int removeMin() {
    int x = this.heap.get(0);
    this.heap.set(0, this.heap.back());
    this.indices.set(this.heap.get(0), 0);
    this.indices.set(x, -1);
    this.heap.pop();
    if (this.heap.size() > 1)
      this.percolateDown(0);
    return x;
  }
902169
public Set<ElementDescriptor<?>> getRemoved()
	{
		return mRemove == null ? null : Collections.unmodifiableSet(mRemove.keySet());
	}
1270846
public QueueElement removeTail() {

		if (head == null) {
			return null;
		}

		QueueElement result = tail;
		if (result.previous == null) {
			head = null;
			tail = null;
		} else {
			tail = result.previous;
			tail.next = null;
		}
		result.previous = null;
		result.next = null;
		result.queue = null;

		numElements--;
		return result;

	}
1002518
public Object remove(int index) {

        //Check that the index is less than size because the getInternal
        //method is being called with index - 1 and its checks will therefore
        //not be useful in this case.
        if (index >= size()) {
            throw new IndexOutOfBoundsException("Index out of bounds: "
                                                + index + " >= " + size());
        }

        //Get the node that is previous to the node being removed
        Node previousToRemove;

        if (index == 0) {
            previousToRemove = first;
        } else {
            previousToRemove = getInternal(index - 1);
        }

        //previousToRemove.next will never be null because of the check above
        //that index < size.
        Node toRemove = previousToRemove.next;

        previousToRemove.next = toRemove.next;

        elementCount--;

        //If they removed at the last valid index, then a the last element
        //was removed, therfore update the last pointer
        if (last == toRemove) {
            last = previousToRemove;
        }

        return toRemove.data;
    }
1342163
public O removeObject(O e) {
    int pos = index.getInt(e);
    return (pos >= 0) ? removeAt(pos) : null;
  }
280536
public DrawerView removeItem(int position) {
        mAdapter.getItem(position).detach();
        mAdapter.remove(mAdapter.getItem(position));
        updateList();
        return this;
    }
423685
public T removeFirst() {
        try {
            modifyLock.lock();
            Iterator<T> it = iterator();
            if (it.hasNext()) {
                T item = it.next();
                it.remove();
                return item;
            }
        } finally {
            modifyLock.unlock();
        }
        return null;
    }
1157759
public QueueItem poll() {
        QueueItem item = peek();
        if (item == null) {
            return null;
        }
        if (store.isEnabled()) {
            try {
                store.delete(item.getItemId());
            } catch (Exception e) {
                throw new HazelcastException(e);
            }
        }
        getItemQueue().poll();
        age(item, Clock.currentTimeMillis());
        scheduleEvictionIfEmpty();
        return item;
    }
653882
public E poll() {
        if (mSize.get() == 0)
            return null;
        mPollLock.lock();
        try {
            return removeHead();
        }
        finally {
            mPollLock.unlock();
        }
    }