# | Line 129 | Line 129 | public class PriorityQueue<E> extends Ab | |
---|---|---|
129 | initialCapacity = 1; | |
130 | queue = new E[initialCapacity + 1]; | |
131 | ||
132 | – | /* Commented out to compile with generics compiler |
133 | – | |
132 | if (initialElements instanceof Sorted) { | |
133 | comparator = ((Sorted)initialElements).comparator(); | |
134 | for (Iterator<E> i = initialElements.iterator(); i.hasNext(); ) | |
135 | queue[++size] = i.next(); | |
136 | } else { | |
139 | – | */ |
140 | – | { |
137 | comparator = null; | |
138 | for (Iterator<E> i = initialElements.iterator(); i.hasNext(); ) | |
139 | add(i.next()); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |