jdk/src/share/classes/java/util/PriorityQueue.java
changeset 19037 18aee3cc498f
parent 17168 b7d3500f2516
child 19059 510ac28edfef
equal deleted inserted replaced
19036:7e9050510b51 19037:18aee3cc498f
   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.