guava/src/com/google/common/collect/MinMaxPriorityQueue.java
private E removeAndGet(int index) {
    E value = elementData(index);
    removeAt(index);
    return value;
  }
private E removeAndGet(int index) {
    E value = elementData(index);
    removeAt(index);
    return value;
  }
Removes and returns the value at {@code index}.