1 |
tim |
1.1 |
package java.util.concurrent; |
2 |
|
|
|
3 |
|
|
import java.util.*; |
4 |
|
|
|
5 |
|
|
/** |
6 |
|
|
* An unbounded blocking priority queue. Ordering follows the |
7 |
|
|
* java.util.Collection conventions: Either the elements must be |
8 |
|
|
* Comparable, or a Comparator must be supplied. Elements with tied |
9 |
|
|
* priorities are returned in arbitrary order. Comparison failures |
10 |
|
|
* throw ClassCastExceptions during insertions and extractions. |
11 |
|
|
**/ |
12 |
|
|
public class PriorityBlockingQueue<E> extends AbstractCollection<E> |
13 |
|
|
implements BlockingQueue<E>, java.io.Serializable { |
14 |
|
|
|
15 |
|
|
public PriorityBlockingQueue() {} |
16 |
|
|
public PriorityBlockingQueue(Comparator comparator) {} |
17 |
|
|
|
18 |
|
|
public void put(E x) { |
19 |
|
|
} |
20 |
|
|
public boolean offer(E x) { |
21 |
|
|
return false; |
22 |
|
|
} |
23 |
|
|
public boolean remove(Object x) { |
24 |
|
|
return false; |
25 |
|
|
} |
26 |
|
|
public E remove() { |
27 |
|
|
return null; |
28 |
|
|
} |
29 |
|
|
|
30 |
|
|
public E element() { |
31 |
|
|
return null; |
32 |
|
|
} |
33 |
|
|
public boolean offer(E x, long timeout, TimeUnit granularity) { |
34 |
|
|
return false; |
35 |
|
|
} |
36 |
|
|
public E take() throws InterruptedException { |
37 |
|
|
return null; |
38 |
|
|
} |
39 |
|
|
public boolean add(E x) { |
40 |
|
|
return false; |
41 |
|
|
} |
42 |
|
|
public E poll() { |
43 |
|
|
return null; |
44 |
|
|
} |
45 |
|
|
public E poll(long timeout, TimeUnit granularity) throws InterruptedException { |
46 |
|
|
return null; |
47 |
|
|
} |
48 |
|
|
public E peek() { |
49 |
|
|
return null; |
50 |
|
|
} |
51 |
|
|
public boolean isEmpty() { |
52 |
|
|
return false; |
53 |
|
|
} |
54 |
|
|
public int size() { |
55 |
|
|
return 0; |
56 |
|
|
} |
57 |
|
|
public Object[] toArray() { |
58 |
|
|
return null; |
59 |
|
|
} |
60 |
|
|
|
61 |
|
|
public <T> T[] toArray(T[] array) { |
62 |
|
|
return null; |
63 |
|
|
} |
64 |
|
|
|
65 |
|
|
public Iterator<E> iterator() { |
66 |
|
|
return null; |
67 |
|
|
} |
68 |
|
|
} |