Lines Matching defs:comparator
92 * priority queue is ordered by comparator, or by the elements'
93 * natural ordering, if comparator is null: For each node n in the
105 * The comparator, or null if priority queue uses elements'
108 private final Comparator<? super E> comparator;
140 * whose elements are ordered according to the specified comparator.
142 * @param comparator the comparator that will be used to order this
147 public PriorityQueue(Comparator<? super E> comparator) {
148 this(DEFAULT_INITIAL_CAPACITY, comparator);
153 * that orders its elements according to the specified comparator.
156 * @param comparator the comparator that will be used to order this
163 Comparator<? super E> comparator) {
169 this.comparator = comparator;
192 this.comparator = (Comparator<? super E>) ss.comparator();
197 this.comparator = (Comparator<? super E>) pq.comparator();
201 this.comparator = null;
222 this.comparator = (Comparator<? super E>) c.comparator();
241 this.comparator = (Comparator<? super E>) c.comparator();
260 if (len == 1 || this.comparator != null)
644 if (comparator != null)
669 if (comparator.compare(x, (E) e) >= 0)
686 if (comparator != null)
719 comparator.compare((E) c, (E) queue[right]) > 0)
721 if (comparator.compare(x, (E) c) <= 0)
740 * Returns the comparator used to order the elements in this
744 * @return the comparator used to order this queue, or
748 public Comparator<? super E> comparator() {
749 return comparator;