Lines Matching refs:comparator

46  * whether or not an explicit comparator is provided, must be <em>consistent
117 * The comparator used to maintain order in this tree map, or
122 private final Comparator<? super K> comparator;
149 comparator = null;
154 * comparator. All keys inserted into the map must be <em>mutually
155 * comparable</em> by the given comparator: {@code comparator.compare(k1,
162 * @param comparator the comparator that will be used to order this map.
166 public TreeMap(Comparator<? super K> comparator) {
167 this.comparator = comparator;
185 comparator = null;
195 * and whose comparator is to be used to sort this map
199 comparator = m.comparator();
229 * and this map uses natural ordering, or its comparator
275 * and this map uses natural ordering, or its comparator
283 public Comparator<? super K> comparator() {
284 return comparator;
316 Comparator<?> c = ((SortedMap<?,?>)map).comparator();
317 if (c == comparator || (c != null && c.equals(comparator))) {
340 * and this map uses natural ordering, or its comparator
344 // Offload comparator-based version for sake of performance
345 if (comparator != null)
365 * Version of getEntry using comparator. Split off from getEntry
367 * that are less dependent on comparator performance, but is
373 Comparator<? super K> cpr = comparator;
533 * and this map uses natural ordering, or its comparator
548 // split comparator and comparable paths
549 Comparator<? super K> cpr = comparator;
600 * and this map uses natural ordering, or its comparator
637 // Put clone into "virgin" state (except for comparator)
696 * and this map uses natural ordering, or its comparator
707 * and this map uses natural ordering, or its comparator
718 * and this map uses natural ordering, or its comparator
729 * and this map uses natural ordering, or its comparator
740 * and this map uses natural ordering, or its comparator
751 * and this map uses natural ordering, or its comparator
762 * and this map uses natural ordering, or its comparator
773 * and this map uses natural ordering, or its comparator
800 * key order. The spliterator's comparator (see
802 * the tree map's comparator (see {@link #comparator()}) is {@code null}.
803 * Otherwise, the spliterator's comparator is the same as or imposes the
804 * same total ordering as the tree map's comparator.
907 * null and this map uses natural ordering, or its comparator
922 * and this map uses natural ordering, or its comparator
936 * and this map uses natural ordering, or its comparator
950 * null and this map uses natural ordering, or its comparator
961 * and this map uses natural ordering, or its comparator
972 * and this map uses natural ordering, or its comparator
1146 public Comparator<? super E> comparator() { return m.comparator(); }
1295 return comparator==null ? ((Comparable<? super K>)k1).compareTo((K)k2)
1296 : comparator.compare((K)k1, (K)k2);
1813 return NavigableSubMap.this.comparator();
1864 public Comparator<? super K> comparator() {
1865 return m.comparator();
1955 Collections.reverseOrder(m.comparator);
1957 public Comparator<? super K> comparator() {
2061 public Comparator<? super K> comparator() { throw new InternalError(); }
2515 * It is assumed that the comparator of the TreeMap is already set prior
2546 * It is assumed that the comparator and size fields of the TreeMap are
2812 return tree.comparator;
3036 // Adapt or create a key-based comparator
3037 if (tree.comparator != null) {
3038 return Map.Entry.comparingByKey(tree.comparator);