equal
deleted
inserted
replaced
131 * @throws IllegalArgumentException if {@code initialCapacity} is less |
131 * @throws IllegalArgumentException if {@code initialCapacity} is less |
132 * than 1 |
132 * than 1 |
133 */ |
133 */ |
134 public PriorityQueue(int initialCapacity) { |
134 public PriorityQueue(int initialCapacity) { |
135 this(initialCapacity, null); |
135 this(initialCapacity, null); |
|
136 } |
|
137 |
|
138 /** |
|
139 * Creates a {@code PriorityQueue} with the default initial capacity |
|
140 * that orders its elements according to the specified comparator. |
|
141 * |
|
142 * @param comparator the comparator that will be used to order this |
|
143 * priority queue. If {@code null}, the {@linkplain Comparable |
|
144 * natural ordering} of the elements will be used. |
|
145 * @since 1.8 |
|
146 */ |
|
147 public PriorityQueue(Comparator<? super E> comparator) { |
|
148 this(DEFAULT_INITIAL_CAPACITY, comparator); |
136 } |
149 } |
137 |
150 |
138 /** |
151 /** |
139 * Creates a {@code PriorityQueue} with the specified initial capacity |
152 * Creates a {@code PriorityQueue} with the specified initial capacity |
140 * that orders its elements according to the specified comparator. |
153 * that orders its elements according to the specified comparator. |