10 |
|
/** |
11 |
|
* An unbounded blocking queue based on a {@link PriorityQueue}, |
12 |
|
* obeying its ordering rules and implementation characteristics. |
13 |
< |
**/ |
13 |
> |
* @since 1.5 |
14 |
> |
* @author Doug Lea |
15 |
> |
**/ |
16 |
|
public class PriorityBlockingQueue<E> extends AbstractQueue<E> |
17 |
|
implements BlockingQueue<E>, java.io.Serializable { |
18 |
|
|
73 |
|
} |
74 |
|
|
75 |
|
public boolean offer(E x) { |
76 |
< |
if (x == null) throw new IllegalArgumentException(); |
76 |
> |
if (x == null) throw new NullPointerException(); |
77 |
|
lock.lock(); |
78 |
|
try { |
79 |
|
boolean ok = q.offer(x); |