62 |
|
* @param <E> the type of elements held in this collection |
63 |
|
*/ |
64 |
|
public class PriorityQueue<E> extends AbstractQueue<E> |
65 |
< |
implements Queue<E>, java.io.Serializable { |
65 |
> |
implements java.io.Serializable { |
66 |
|
|
67 |
|
private static final long serialVersionUID = -7720805057305804111L; |
68 |
|
|
199 |
|
public PriorityQueue(Collection<? extends E> c) { |
200 |
|
initializeArray(c); |
201 |
|
if (c instanceof SortedSet) { |
202 |
< |
// @fixme double-cast workaround for compiler |
203 |
< |
SortedSet<? extends E> s = (SortedSet<? extends E>) (SortedSet)c; |
202 |
> |
SortedSet<? extends E> s = (SortedSet<? extends E>)c; |
203 |
|
comparator = (Comparator<? super E>)s.comparator(); |
204 |
|
fillFromSorted(s); |
205 |
|
} else if (c instanceof PriorityQueue) { |