Home
last modified time | relevance | path

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

12

/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.java125 InterfaceAddress cmp = (InterfaceAddress) obj; in equals() local
126 if ( !(address == null ? cmp.address == null : address.equals(cmp.address)) ) in equals()
128 if ( !(broadcast == null ? cmp.broadcast == null : broadcast.equals(cmp.broadcast)) ) in equals()
130 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()
/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.java126 final boolean cas(long cmp, long val) { in cas() argument
127 return U.compareAndSwapLong(this, VALUE, cmp, val); in cas()
177 final boolean casBase(long cmp, long val) { in casBase() argument
178 return U.compareAndSwapLong(this, BASE, cmp, val); in casBase()
DAtomicMarkableReference.java204 private boolean casPair(Pair<V> cmp, Pair<V> val) { in casPair() argument
205 return U.compareAndSwapObject(this, PAIR, cmp, val); in casPair()
DAtomicStampedReference.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/nio/
DShortBuffer.java692 int cmp = compare(this.get(i), that.get(j)); in compareTo() local
693 if (cmp != 0) in compareTo()
694 return cmp; in compareTo()
DDoubleBuffer.java692 int cmp = Double.compare(this.get(i), that.get(j)); in compareTo() local
693 if (cmp != 0) in compareTo()
694 return cmp; in compareTo()
DFloatBuffer.java691 int cmp = compare(this.get(i), that.get(j)); in compareTo() local
692 if (cmp != 0) in compareTo()
693 return cmp; in compareTo()
DIntBuffer.java693 int cmp = compare(this.get(i), that.get(j)); in compareTo() local
694 if (cmp != 0) in compareTo()
695 return cmp; in compareTo()
DLongBuffer.java691 int cmp = compare(this.get(i), that.get(j)); in compareTo() local
692 if (cmp != 0) in compareTo()
693 return cmp; in compareTo()
DCharBuffer.java874 int cmp = compare(this.get(i), that.get(j)); in compareTo() local
875 if (cmp != 0) in compareTo()
876 return cmp; in compareTo()
/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()

12