200 |
|
} |
201 |
|
|
202 |
|
/** |
203 |
+ |
* Creates a {@code PriorityBlockingQueue} with the default |
204 |
+ |
* initial capacity that orders its elements according to the |
205 |
+ |
* specified comparator. |
206 |
+ |
* |
207 |
+ |
* @param comparator the comparator that will be used to order this |
208 |
+ |
* priority queue. If {@code null}, the {@linkplain Comparable |
209 |
+ |
* natural ordering} of the elements will be used. |
210 |
+ |
* @since 1.8 |
211 |
+ |
*/ |
212 |
+ |
public PriorityBlockingQueue(Comparator<? super E> comparator) { |
213 |
+ |
this(DEFAULT_INITIAL_CAPACITY, comparator); |
214 |
+ |
} |
215 |
+ |
|
216 |
+ |
/** |
217 |
|
* Creates a {@code PriorityBlockingQueue} containing the elements |
218 |
|
* in the specified collection. If the specified collection is a |
219 |
|
* {@link SortedSet} or a {@link PriorityQueue}, this |