1 |
+ |
/* |
2 |
+ |
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
+ |
* Expert Group and released to the public domain, as explained at |
4 |
+ |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
+ |
*/ |
6 |
+ |
|
7 |
|
import java.util.*; |
8 |
|
import java.util.concurrent.*; |
9 |
|
import java.util.concurrent.locks.*; |
11 |
|
public class SynchronizedLinkedListQueue<E> |
12 |
|
extends AbstractCollection<E> implements Queue<E> { |
13 |
|
private final Queue<E> q = new LinkedList<E>(); |
14 |
< |
|
14 |
> |
|
15 |
|
public synchronized Iterator<E> iterator() { |
16 |
|
return q.iterator(); |
17 |
|
} |
74 |
|
} |
75 |
|
|
76 |
|
} |
71 |
– |
|