private static class BoundedPriorityBlockingQueue.PriorityQueue<E> extends Object
Modifier and Type | Field and Description |
---|---|
private Comparator<? super E> |
comparator |
private int |
head |
private E[] |
objects |
private int |
tail |
Constructor and Description |
---|
PriorityQueue(int capacity,
Comparator<? super E> comparator) |
Modifier and Type | Method and Description |
---|---|
void |
add(E elem) |
Comparator<? super E> |
comparator() |
boolean |
contains(Object o) |
E |
peek() |
E |
poll() |
int |
remainingCapacity() |
int |
size() |
private int |
upperBound(int start,
int end,
E key) |
private final Comparator<? super E> comparator
private int head
private int tail
public PriorityQueue(int capacity, Comparator<? super E> comparator)
public int size()
public Comparator<? super E> comparator()
public int remainingCapacity()
private int upperBound(int start, int end, E key)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.