Creates an empty PriorityQueue with the ordering given by its elements' natural ordering. @since 11.0 (requires that E be Comparable since 15.0).
()
| 243 | |
| 244 | |
| 245 | public static <E extends Comparable> PriorityQueue<E> newPriorityQueue() { |
| 246 | return new PriorityQueue<E>(); |
| 247 | } |
| 248 | |
| 249 | /** |
| 250 | * Creates a {@code PriorityQueue} containing the given elements. |