Creates an empty PriorityQueue with the ordering given by its elements' natural ordering. @since 11.0 (requires that E be Comparable since 15.0).
()
| 216 | * @since 11.0 (requires that {@code E} be {@code Comparable} since 15.0). |
| 217 | */ |
| 218 | public static <E extends Comparable> PriorityQueue<E> newPriorityQueue() { |
| 219 | return new PriorityQueue<E>(); |
| 220 | } |
| 221 | |
| 222 | /** |
| 223 | * Creates a {@code PriorityQueue} containing the given elements. |