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 |
---|
BoundedPriorityBlockingQueue.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 final E[] objects
private int head
private int tail
public BoundedPriorityBlockingQueue.PriorityQueue(int capacity, Comparator<? super E> comparator)
public void add(E elem)
public E peek()
public E poll()
public int size()
public Comparator<? super E> comparator()
public boolean contains(Object o)
public int remainingCapacity()
private int upperBound(int start, int end, E key)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.