Home
last modified time | relevance | path

Searched refs:cmp (Results 1 – 25 of 54) sorted by relevance

123

/libcore/ojluni/src/test/java/nio/file/attribute/
DFileTimeTest.java67 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/
DInterfaceAddress.java127 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/main/java/java/util/concurrent/
DConcurrentSkipListMap.java403 private boolean casHead(HeadIndex<K,V> cmp, HeadIndex<K,V> val) { in casHead() argument
404 return U.compareAndSwapObject(this, HEAD, cmp, val); in casHead()
446 boolean casValue(Object cmp, Object val) { in casValue() argument
447 return U.compareAndSwapObject(this, VALUE, cmp, val); in casValue()
453 boolean casNext(Node<K,V> cmp, Node<K,V> val) { in casNext() argument
454 return U.compareAndSwapObject(this, NEXT, cmp, val); in casNext()
579 final boolean casRight(Index<K,V> cmp, Index<K,V> val) { in casRight() argument
580 return U.compareAndSwapObject(this, RIGHT, cmp, val); in casRight()
663 private Node<K,V> findPredecessor(Object key, Comparator<? super K> cmp) { in findPredecessor() argument
677 if (cpr(cmp, key, k) > 0) { in findPredecessor()
[all …]
DPriorityBlockingQueue.java330 Comparator<? super E> cmp = comparator; in dequeue() local
331 if (cmp == null) in dequeue()
334 siftDownUsingComparator(0, x, array, n, cmp); in dequeue()
369 Comparator<? super T> cmp) { in siftUpUsingComparator() argument
373 if (cmp.compare(x, (T) e) >= 0) in siftUpUsingComparator()
414 Comparator<? super T> cmp) { in siftDownUsingComparator() argument
421 if (right < n && cmp.compare((T) c, (T) array[right]) > 0) in siftDownUsingComparator()
423 if (cmp.compare(x, (T) c) <= 0) in siftDownUsingComparator()
440 Comparator<? super E> cmp = comparator; in heapify() local
441 if (cmp == null) { in heapify()
[all …]
DSynchronousQueue.java248 boolean casNext(SNode cmp, SNode val) { in casNext() argument
249 return cmp == next && in casNext()
250 U.compareAndSwapObject(this, NEXT, cmp, val); in casNext()
547 boolean casNext(QNode cmp, QNode val) { in casNext() argument
548 return next == cmp && in casNext()
549 U.compareAndSwapObject(this, NEXT, cmp, val); in casNext()
552 boolean casItem(Object cmp, Object val) { in casItem() argument
553 return item == cmp && in casItem()
554 U.compareAndSwapObject(this, ITEM, cmp, val); in casItem()
560 void tryCancel(Object cmp) { in tryCancel() argument
[all …]
DConcurrentLinkedQueue.java196 static <E> boolean casItem(Node<E> node, E cmp, E val) { in casItem() argument
197 return U.compareAndSwapObject(node, ITEM, cmp, val); in casItem()
204 static <E> boolean casNext(Node<E> node, Node<E> cmp, Node<E> val) { in casNext() argument
205 return U.compareAndSwapObject(node, NEXT, cmp, val); in casNext()
922 private boolean casTail(Node<E> cmp, Node<E> val) { in casTail() argument
923 return U.compareAndSwapObject(this, TAIL, cmp, val); in casTail()
926 private boolean casHead(Node<E> cmp, Node<E> val) { in casHead() argument
927 return U.compareAndSwapObject(this, HEAD, cmp, val); in casHead()
DLinkedTransferQueue.java458 final boolean casNext(Node cmp, Node val) { in casNext() argument
459 return U.compareAndSwapObject(this, NEXT, cmp, val); in casNext()
462 final boolean casItem(Object cmp, Object val) { in casItem() argument
464 return U.compareAndSwapObject(this, ITEM, cmp, val); in casItem()
569 private boolean casTail(Node cmp, Node val) { in casTail() argument
570 return U.compareAndSwapObject(this, TAIL, cmp, val); in casTail()
573 private boolean casHead(Node cmp, Node val) { in casHead() argument
574 return U.compareAndSwapObject(this, HEAD, cmp, val); in casHead()
577 private boolean casSweepVotes(int cmp, int val) { in casSweepVotes() argument
578 return U.compareAndSwapInt(this, SWEEPVOTES, cmp, val); in casSweepVotes()
DConcurrentLinkedDeque.java307 boolean casItem(E cmp, E val) { in casItem() argument
308 return U.compareAndSwapObject(this, ITEM, cmp, val); in casItem()
315 boolean casNext(Node<E> cmp, Node<E> val) { in casNext() argument
316 return U.compareAndSwapObject(this, NEXT, cmp, val); in casNext()
323 boolean casPrev(Node<E> cmp, Node<E> val) { in casPrev() argument
324 return U.compareAndSwapObject(this, PREV, cmp, val); in casPrev()
1601 private boolean casHead(Node<E> cmp, Node<E> val) { in casHead() argument
1602 return U.compareAndSwapObject(this, HEAD, cmp, val); in casHead()
1605 private boolean casTail(Node<E> cmp, Node<E> val) { in casTail() argument
1606 return U.compareAndSwapObject(this, TAIL, cmp, val); in casTail()
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoZonedDateTime.java570 int cmp = Long.compare(toEpochSecond(), other.toEpochSecond()); in compareTo() local
571 if (cmp == 0) { in compareTo()
572 cmp = toLocalTime().getNano() - other.toLocalTime().getNano(); in compareTo()
573 if (cmp == 0) { in compareTo()
574 cmp = toLocalDateTime().compareTo(other.toLocalDateTime()); in compareTo()
575 if (cmp == 0) { in compareTo()
576 cmp = getZone().getId().compareTo(other.getZone().getId()); in compareTo()
577 if (cmp == 0) { in compareTo()
578 cmp = getChronology().compareTo(other.getChronology()); in compareTo()
583 return cmp; in compareTo()
DChronoLocalDateTime.java500 int cmp = toLocalDate().compareTo(other.toLocalDate()); in compareTo() local
501 if (cmp == 0) { in compareTo()
502 cmp = toLocalTime().compareTo(other.toLocalTime()); in compareTo()
503 if (cmp == 0) { in compareTo()
504 cmp = getChronology().compareTo(other.getChronology()); in compareTo()
507 return cmp; in compareTo()
DChronoLocalDate.java704 int cmp = Long.compare(toEpochDay(), other.toEpochDay()); in compareTo() local
705 if (cmp == 0) { in compareTo()
706 cmp = getChronology().compareTo(other.getChronology()); in compareTo()
708 return cmp; in compareTo()
DAbstractChronology.java141 …int cmp = Long.compare(dateTime1.toLocalDate().toEpochDay(), dateTime2.toLocalDate().toEpochDay());
142 if (cmp == 0) {
143cmp = Long.compare(dateTime1.toLocalTime().toNanoOfDay(), dateTime2.toLocalTime().toNanoOfDay());
145 return cmp;
152 int cmp = Long.compare(dateTime1.toEpochSecond(), dateTime2.toEpochSecond());
153 if (cmp == 0) {
154cmp = Long.compare(dateTime1.toLocalTime().getNano(), dateTime2.toLocalTime().getNano());
156 return cmp;
/libcore/ojluni/src/main/java/java/util/
DMap.java505 public static <K, V> Comparator<Map.Entry<K, V>> comparingByKey(Comparator<? super K> cmp) { in comparingByKey() argument
506 Objects.requireNonNull(cmp); in comparingByKey()
508 (c1, c2) -> cmp.compare(c1.getKey(), c2.getKey()); in comparingByKey()
524 … public static <K, V> Comparator<Map.Entry<K, V>> comparingByValue(Comparator<? super V> cmp) { in comparingByValue() argument
525 Objects.requireNonNull(cmp); in comparingByValue()
527 (c1, c2) -> cmp.compare(c1.getValue(), c2.getValue()); in comparingByValue()
/libcore/ojluni/src/main/java/java/nio/file/attribute/
DFileTime.java345 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/
DStriped64.java127 final boolean cas(long cmp, long val) { in cas() argument
128 return U.compareAndSwapLong(this, VALUE, cmp, val); in cas()
178 final boolean casBase(long cmp, long val) { in casBase() argument
179 return U.compareAndSwapLong(this, BASE, cmp, val); in casBase()
DAtomicStampedReference.java204 private boolean casPair(Pair<V> cmp, Pair<V> val) { in casPair() argument
205 return U.compareAndSwapObject(this, PAIR, cmp, val); in casPair()
DAtomicMarkableReference.java204 private boolean casPair(Pair<V> cmp, Pair<V> val) { in casPair() argument
205 return U.compareAndSwapObject(this, PAIR, cmp, val); in casPair()
/libcore/ojluni/src/main/java/java/time/
DOffsetDateTime.java171 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()
1797 int cmp = compareInstant(this, other); in compareTo() local
1798 if (cmp == 0) { in compareTo()
1799 cmp = toLocalDateTime().compareTo(other.toLocalDateTime()); in compareTo()
1801 return cmp; in compareTo()
DMonthDay.java674 int cmp = (month - other.month); in compareTo() local
675 if (cmp == 0) { in compareTo()
676 cmp = (day - other.day); in compareTo()
678 return cmp; in compareTo()
DLocalTime.java1478 int cmp = Integer.compare(hour, other.hour); in compareTo() local
1479 if (cmp == 0) { in compareTo()
1480 cmp = Integer.compare(minute, other.minute); in compareTo()
1481 if (cmp == 0) { in compareTo()
1482 cmp = Integer.compare(second, other.second); in compareTo()
1483 if (cmp == 0) { in compareTo()
1484 cmp = Integer.compare(nano, other.nano); in compareTo()
1488 return cmp; in compareTo()
/libcore/ojluni/src/main/java/java/nio/
DShortBuffer.java833 int cmp = compare(this.get(i), that.get(j)); in compareTo() local
834 if (cmp != 0) in compareTo()
835 return cmp; in compareTo()
DLongBuffer.java833 int cmp = compare(this.get(i), that.get(j)); in compareTo() local
834 if (cmp != 0) in compareTo()
835 return cmp; in compareTo()
DIntBuffer.java840 int cmp = compare(this.get(i), that.get(j)); in compareTo() local
841 if (cmp != 0) in compareTo()
842 return cmp; in compareTo()
DDoubleBuffer.java836 int cmp = compare(this.get(i), that.get(j)); in compareTo() local
837 if (cmp != 0) in compareTo()
838 return cmp; in compareTo()
DFloatBuffer.java839 int cmp = compare(this.get(i), that.get(j)); in compareTo() local
840 if (cmp != 0) in compareTo()
841 return cmp; in compareTo()

123