/libcore/ojluni/src/test/java/util/Map/ |
D | EntryComparators.java | 69 Comparator<Map.Entry<K, V>> cmp = ck.thenComparing(cv); in assertPairComparison() 70 assertTrue(cmp.compare(p11, p11) == 0); in assertPairComparison() 71 assertTrue(cmp.compare(p12, p11) > 0); in assertPairComparison() 72 assertTrue(cmp.compare(p11, p12) < 0); in assertPairComparison() 73 assertTrue(cmp.compare(p12, p22) < 0); in assertPairComparison() 74 assertTrue(cmp.compare(p12, p21) < 0); in assertPairComparison() 75 assertTrue(cmp.compare(p21, p11) > 0); in assertPairComparison() 76 assertTrue(cmp.compare(p21, p12) > 0); in assertPairComparison() 78 cmp = cv.thenComparing(ck); in assertPairComparison() 79 assertTrue(cmp.compare(p11, p11) == 0); in assertPairComparison() [all …]
|
/libcore/ojluni/src/test/java/nio/file/attribute/ |
D | FileTimeTest.java | 67 cmp(now, MILLISECONDS, now, MILLISECONDS, 0); in main() 68 cmp(now, MILLISECONDS, now*1000L, MICROSECONDS, 0); in main() 69 cmp(now, MILLISECONDS, now-1234, MILLISECONDS, 1); in main() 70 cmp(now, MILLISECONDS, now+1234, MILLISECONDS, -1); in main() 72 cmp(tomorrowInDays, DAYS, now, MILLISECONDS, 1); in main() 73 cmp(now, MILLISECONDS, tomorrowInDays, DAYS, -1); in main() 74 cmp(yesterdayInDays, DAYS, now, MILLISECONDS, -1); in main() 75 cmp(now, MILLISECONDS, yesterdayInDays, DAYS, 1); in main() 76 cmp(yesterdayInDays, DAYS, now, MILLISECONDS, -1); in main() 78 cmp(Long.MAX_VALUE, DAYS, Long.MAX_VALUE, NANOSECONDS, 1); in main() [all …]
|
/libcore/ojluni/src/main/java/java/net/ |
D | InterfaceAddress.java | 127 InterfaceAddress cmp = (InterfaceAddress) obj; in equals() local 128 if ( !(address == null ? cmp.address == null : address.equals(cmp.address)) ) in equals() 130 if ( !(broadcast == null ? cmp.broadcast == null : broadcast.equals(cmp.broadcast)) ) in equals() 132 if (maskLength != cmp.maskLength) in equals()
|
/libcore/ojluni/src/test/java/util/Collections/ |
D | ReverseOrder2.java | 55 check(Collections.reverseOrder(Collections.reverseOrder(cmp)) in realMain() 56 == cmp); in realMain() 58 equal(Collections.reverseOrder(cmp), in realMain() 59 Collections.reverseOrder(cmp)); in realMain() 61 equal(Collections.reverseOrder(cmp).hashCode(), in realMain() 62 Collections.reverseOrder(cmp).hashCode()); in realMain() 64 check(Collections.reverseOrder(cmp).hashCode() != in realMain() 65 cmp.hashCode()); in realMain() 77 Collections.sort(list, Collections.reverseOrder(cmp)); in test() 81 private static Comparator<String> cmp = new Comparator<>() { field in ReverseOrder2
|
D | ReverseOrder.java | 71 Comparator cmp = Collections.reverseOrder(); in main() local 72 Collections.sort(list, cmp); in main() 79 Comparator clone = serialClone(cmp); in main()
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | ConcurrentSkipListMap.java | 465 private Node<K,V> findPredecessor(Object key, Comparator<? super K> cmp) { in findPredecessor() argument 477 else if (cpr(cmp, key, k) > 0) in findPredecessor() 507 Comparator<? super K> cmp = comparator; in findNode() local 509 outer: while ((b = findPredecessor(key, cmp)) != null) { in findNode() 518 else if ((c = cpr(cmp, key, k)) > 0) in findNode() 542 Comparator<? super K> cmp = comparator; in doGet() local 551 else if ((c = cpr(cmp, key, k)) > 0) in doGet() 569 (c = cpr(cmp, key, k)) > 0) in doGet() 599 Comparator<? super K> cmp = comparator; in doPut() local 616 else if (cpr(cmp, key, k) > 0) in doPut() [all …]
|
D | PriorityBlockingQueue.java | 328 final Comparator<? super E> cmp; in dequeue() local 329 if ((cmp = comparator) == null) in dequeue() 332 siftDownUsingComparator(0, x, es, n, cmp); in dequeue() 365 int k, T x, Object[] es, Comparator<? super T> cmp) { in siftUpUsingComparator() argument 369 if (cmp.compare(x, (T) e) >= 0) in siftUpUsingComparator() 407 int k, T x, Object[] es, int n, Comparator<? super T> cmp) { in siftDownUsingComparator() argument 414 if (right < n && cmp.compare((T) c, (T) es[right]) > 0) in siftDownUsingComparator() 416 if (cmp.compare(x, (T) c) <= 0) in siftDownUsingComparator() 432 final Comparator<? super E> cmp; in heapify() local 433 if ((cmp = comparator) == null) in heapify() [all …]
|
D | SynchronousQueue.java | 245 boolean casNext(SNode cmp, SNode val) { in casNext() argument 246 return cmp == next && in casNext() 247 SNEXT.compareAndSet(this, cmp, val); in casNext() 516 boolean casNext(QNode cmp, QNode val) { in casNext() argument 517 return next == cmp && in casNext() 518 QNEXT.compareAndSet(this, cmp, val); in casNext() 521 boolean casItem(Object cmp, Object val) { in casItem() argument 522 return item == cmp && in casItem() 523 QITEM.compareAndSet(this, cmp, val); in casItem() 529 boolean tryCancel(Object cmp) { in tryCancel() argument [all …]
|
D | LinkedTransferQueue.java | 410 final boolean casNext(Node cmp, Node val) { in casNext() argument 412 return NEXT.compareAndSet(this, cmp, val); in casNext() 415 final boolean casItem(Object cmp, Object val) { in casItem() argument 419 return ITEM.compareAndSet(this, cmp, val); in casItem() 446 final boolean tryMatch(Object cmp, Object val) { in tryMatch() argument 447 if (casItem(cmp, val)) { in tryMatch() 508 private boolean casTail(Node cmp, Node val) { in casTail() argument 511 return TAIL.compareAndSet(this, cmp, val); in casTail() 514 private boolean casHead(Node cmp, Node val) { in casHead() argument 515 return HEAD.compareAndSet(this, cmp, val); in casHead()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | ChronoZonedDateTime.java | 142 int cmp = Long.compare(dateTime1.toEpochSecond(), dateTime2.toEpochSecond()); in timeLineOrder() 143 if (cmp == 0) { in timeLineOrder() 144 … cmp = Long.compare(dateTime1.toLocalTime().getNano(), dateTime2.toLocalTime().getNano()); in timeLineOrder() 146 return cmp; in timeLineOrder() 577 int cmp = Long.compare(toEpochSecond(), other.toEpochSecond()); in compareTo() local 578 if (cmp == 0) { in compareTo() 579 cmp = toLocalTime().getNano() - other.toLocalTime().getNano(); in compareTo() 580 if (cmp == 0) { in compareTo() 581 cmp = toLocalDateTime().compareTo(other.toLocalDateTime()); in compareTo() 582 if (cmp == 0) { in compareTo() [all …]
|
D | ChronoLocalDateTime.java | 141 …int cmp = Long.compare(dateTime1.toLocalDate().toEpochDay(), dateTime2.toLocalDate().toEpochDay()); in timeLineOrder() 142 if (cmp == 0) { in timeLineOrder() 143 … cmp = Long.compare(dateTime1.toLocalTime().toNanoOfDay(), dateTime2.toLocalTime().toNanoOfDay()); in timeLineOrder() 145 return cmp; in timeLineOrder() 507 int cmp = toLocalDate().compareTo(other.toLocalDate()); in compareTo() local 508 if (cmp == 0) { in compareTo() 509 cmp = toLocalTime().compareTo(other.toLocalTime()); in compareTo() 510 if (cmp == 0) { in compareTo() 511 cmp = getChronology().compareTo(other.getChronology()); in compareTo() 514 return cmp; in compareTo()
|
D | ChronoLocalDate.java | 707 int cmp = Long.compare(toEpochDay(), other.toEpochDay()); in compareTo() local 708 if (cmp == 0) { in compareTo() 709 cmp = getChronology().compareTo(other.getChronology()); in compareTo() 711 return cmp; in compareTo()
|
/libcore/ojluni/src/main/java/java/util/ |
D | PriorityQueue.java | 599 final Comparator<? super E> cmp; 600 if ((cmp = comparator) == null) 603 siftDownUsingComparator(0, x, es, n, cmp); 674 int k, T x, Object[] es, Comparator<? super T> cmp) { in siftUpUsingComparator() argument 678 if (cmp.compare(x, (T) e) >= 0) in siftUpUsingComparator() 721 int k, T x, Object[] es, int n, Comparator<? super T> cmp) { in siftDownUsingComparator() argument 728 if (right < n && cmp.compare((T) c, (T) es[right]) > 0) in siftDownUsingComparator() 730 if (cmp.compare(x, (T) c) <= 0) in siftDownUsingComparator() 746 final Comparator<? super E> cmp; in heapify() local 747 if ((cmp = comparator) == null) in heapify() [all …]
|
D | ReverseOrderSortedMapView.java | 35 final Comparator<? super K> cmp; field in ReverseOrderSortedMapView 39 cmp = Collections.reverseOrder(map.comparator()); in ReverseOrderSortedMapView() 172 return cmp; 176 if (cmp.compare(fromKey, toKey) <= 0) { 325 return head == null || cmp.compare(k, head) >= 0; 330 return tail == null || cmp.compare(k, tail) < 0; 432 return cmp; 452 cmp.compare(from, to) <= 0) {
|
D | TreeMap.java | 386 int cmp = k.compareTo(p.key); in getEntry() local 387 if (cmp < 0) in getEntry() 389 else if (cmp > 0) in getEntry() 410 int cmp = cpr.compare(k, p.key); in getEntryUsingComparator() local 411 if (cmp < 0) in getEntryUsingComparator() 413 else if (cmp > 0) in getEntryUsingComparator() 431 int cmp = compare(key, p.key); in getCeilingEntry() local 432 if (cmp < 0) { in getCeilingEntry() 437 } else if (cmp > 0) { in getCeilingEntry() 464 int cmp = compare(key, p.key); in getFloorEntry() local [all …]
|
D | ReverseOrderSortedSetView.java | 242 final Comparator<E> cmp; field in Subset 251 cmp = c; in Subset() 256 return head == null || cmp.compare(e, head) >= 0; in aboveHead() 261 return tail == null || cmp.compare(e, tail) < 0; in belowTail() 351 cmp.compare(from, to) <= 0) { in subSet()
|
D | Arrays.java | 913 public static <T> void parallelSort(T[] a, Comparator<? super T> cmp) { in parallelSort() argument 914 if (cmp == null) in parallelSort() 915 cmp = NaturalOrder.INSTANCE; in parallelSort() 919 TimSort.sort(a, 0, n, cmp, null, 0, 0); in parallelSort() 925 MIN_ARRAY_SORT_GRAN : g, cmp).invoke(); in parallelSort() 973 Comparator<? super T> cmp) { in parallelSort() argument 975 if (cmp == null) in parallelSort() 976 cmp = NaturalOrder.INSTANCE; in parallelSort() 980 TimSort.sort(a, fromIndex, toIndex, cmp, null, 0, 0); in parallelSort() 986 MIN_ARRAY_SORT_GRAN : g, cmp).invoke(); in parallelSort() [all …]
|
/libcore/ojluni/src/main/java/java/nio/file/attribute/ |
D | FileTime.java | 345 int cmp = Long.compare(secs, secsOther); in compareTo() local 346 if (cmp != 0) { in compareTo() 347 return cmp; in compareTo() 349 cmp = Long.compare(toInstant().getNano(), other.toInstant().getNano()); in compareTo() 350 if (cmp != 0) { in compareTo() 351 return cmp; in compareTo()
|
/libcore/ojluni/src/main/java/java/util/concurrent/atomic/ |
D | Striped64.java | 128 final boolean cas(long cmp, long val) { in cas() argument 129 return VALUE.weakCompareAndSetRelease(this, cmp, val); in cas() 181 final boolean casBase(long cmp, long val) { in casBase() argument 182 return BASE.weakCompareAndSetRelease(this, cmp, val); in casBase()
|
D | AtomicStampedReference.java | 204 private boolean casPair(Pair<V> cmp, Pair<V> val) { in casPair() argument 205 return PAIR.compareAndSet(this, cmp, val); in casPair()
|
D | AtomicMarkableReference.java | 204 private boolean casPair(Pair<V> cmp, Pair<V> val) { in casPair() argument 205 return PAIR.compareAndSet(this, cmp, val); in casPair()
|
/libcore/ojluni/src/main/java/java/time/ |
D | MonthDay.java | 675 int cmp = (month - other.month); in compareTo() local 676 if (cmp == 0) { in compareTo() 677 cmp = (day - other.day); in compareTo() 679 return cmp; in compareTo()
|
D | LocalTime.java | 1525 int cmp = Integer.compare(hour, other.hour); in compareTo() local 1526 if (cmp == 0) { in compareTo() 1527 cmp = Integer.compare(minute, other.minute); in compareTo() 1528 if (cmp == 0) { in compareTo() 1529 cmp = Integer.compare(second, other.second); in compareTo() 1530 if (cmp == 0) { in compareTo() 1531 cmp = Integer.compare(nano, other.nano); in compareTo() 1535 return cmp; in compareTo()
|
D | OffsetDateTime.java | 171 int cmp = Long.compare(datetime1.toEpochSecond(), datetime2.toEpochSecond()); in compareInstant() local 172 if (cmp == 0) { in compareInstant() 173 cmp = datetime1.toLocalTime().getNano() - datetime2.toLocalTime().getNano(); in compareInstant() 175 return cmp; in compareInstant() 1803 int cmp = compareInstant(this, other); in compareTo() local 1804 if (cmp == 0) { in compareTo() 1805 cmp = toLocalDateTime().compareTo(other.toLocalDateTime()); in compareTo() 1807 return cmp; in compareTo()
|
/libcore/ojluni/src/test/java/lang/invoke/ |
D | SpreadCollectTest.java | 68 Comparator<Integer> cmp = (a, b) -> a - b; in testAsSpreaderExample() local 69 assertTrue((int) compare2FromArray.invoke(Arrays.copyOfRange(ints, 0, 2), cmp) < 0); in testAsSpreaderExample() local 70 assertTrue((int) compare2FromArray.invoke(Arrays.copyOfRange(ints, 1, 3), cmp) > 0); in testAsSpreaderExample() 71 assertTrue((int) compare2FromArray.invoke(Arrays.copyOfRange(ints, 2, 4), cmp) == 0); in testAsSpreaderExample() local
|