/libcore/benchmarks/src/benchmarks/regression/ |
D | CollatorBenchmark.java | 31 collator.compare("abcde", "abcdf"); in timeCollatorPrimary() 32 collator.compare("abcde", "abcde"); in timeCollatorPrimary() 33 collator.compare("abcdf", "abcde"); in timeCollatorPrimary() 40 collator.compare("abcdÂ", "abcdÄ"); in timeCollatorSecondary() 41 collator.compare("abcdÂ", "abcdÂ"); in timeCollatorSecondary() 42 collator.compare("abcdÄ", "abcdÂ"); in timeCollatorSecondary() 49 collator.compare("abcdE", "abcde"); in timeCollatorTertiary() 50 collator.compare("abcde", "abcde"); in timeCollatorTertiary() 51 collator.compare("abcde", "abcdE"); in timeCollatorTertiary() 58 collator.compare("abcdȪ", "abcdȫ"); in timeCollatorIdentical() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | CollatorTest.java | 40 assertTrue("a) Failed on primary difference", c.compare(o, o2) < 0); in test_compareLjava_lang_ObjectLjava_lang_Object() 43 assertTrue("a) Failed on secondary difference", c.compare(o, o2) < 0); in test_compareLjava_lang_ObjectLjava_lang_Object() 46 assertTrue("a) Failed on tertiary difference", c.compare(o, o2) < 0); in test_compareLjava_lang_ObjectLjava_lang_Object() 49 assertTrue("a) Failed on identical", c.compare(o, o2) < 0); in test_compareLjava_lang_ObjectLjava_lang_Object() 52 assertEquals("a) Failed on equivalence", 0, c.compare(o, o2)); in test_compareLjava_lang_ObjectLjava_lang_Object() 54 c.compare("\u01db", "v") < 0); in test_compareLjava_lang_ObjectLjava_lang_Object() 59 assertTrue("b) Failed on primary difference", c.compare(o, o2) < 0); in test_compareLjava_lang_ObjectLjava_lang_Object() 62 assertTrue("b) Failed on secondary difference", c.compare(o, o2) < 0); in test_compareLjava_lang_ObjectLjava_lang_Object() 65 assertTrue("b) Failed on tertiary difference", c.compare(o, o2) < 0); in test_compareLjava_lang_ObjectLjava_lang_Object() 68 assertEquals("b) Failed on identical", 0, c.compare(o, o2)); in test_compareLjava_lang_ObjectLjava_lang_Object() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | ByteTest.java | 24 assertTrue(Byte.compare(max, max) == 0); in test_compare() 25 assertTrue(Byte.compare(min, min) == 0); in test_compare() 26 assertTrue(Byte.compare(zero, zero) == 0); in test_compare() 27 assertTrue(Byte.compare(max, zero) > 0); in test_compare() 28 assertTrue(Byte.compare(max, min) > 0); in test_compare() 29 assertTrue(Byte.compare(zero, max) < 0); in test_compare() 30 assertTrue(Byte.compare(zero, min) > 0); in test_compare() 31 assertTrue(Byte.compare(min, zero) < 0); in test_compare() 32 assertTrue(Byte.compare(min, max) < 0); in test_compare()
|
D | ShortTest.java | 24 assertTrue(Short.compare(max, max) == 0); in test_compare() 25 assertTrue(Short.compare(min, min) == 0); in test_compare() 26 assertTrue(Short.compare(zero, zero) == 0); in test_compare() 27 assertTrue(Short.compare(max, zero) > 0); in test_compare() 28 assertTrue(Short.compare(max, min) > 0); in test_compare() 29 assertTrue(Short.compare(zero, max) < 0); in test_compare() 30 assertTrue(Short.compare(zero, min) > 0); in test_compare() 31 assertTrue(Short.compare(min, zero) < 0); in test_compare() 32 assertTrue(Short.compare(min, max) < 0); in test_compare()
|
D | IntegerTest.java | 43 assertTrue(Integer.compare(max, max) == 0); in testCompare() 44 assertTrue(Integer.compare(min, min) == 0); in testCompare() 45 assertTrue(Integer.compare(zero, zero) == 0); in testCompare() 46 assertTrue(Integer.compare(max, zero) > 0); in testCompare() 47 assertTrue(Integer.compare(max, min) > 0); in testCompare() 48 assertTrue(Integer.compare(zero, max) < 0); in testCompare() 49 assertTrue(Integer.compare(zero, min) > 0); in testCompare() 50 assertTrue(Integer.compare(min, zero) < 0); in testCompare() 51 assertTrue(Integer.compare(min, max) < 0); in testCompare() 165 assertEquals(Integer.compare(i, j),
|
D | LongTest.java | 42 assertTrue(Long.compare(max, max) == 0); in testCompare() 43 assertTrue(Long.compare(min, min) == 0); in testCompare() 44 assertTrue(Long.compare(zero, zero) == 0); in testCompare() 45 assertTrue(Long.compare(max, zero) > 0); in testCompare() 46 assertTrue(Long.compare(max, min) > 0); in testCompare() 47 assertTrue(Long.compare(zero, max) < 0); in testCompare() 48 assertTrue(Long.compare(zero, min) > 0); in testCompare() 49 assertTrue(Long.compare(min, zero) < 0); in testCompare() 50 assertTrue(Long.compare(min, max) < 0); in testCompare() 173 assertEquals(Integer.compare(i, j),
|
D | BooleanTest.java | 31 assertEquals(0, Boolean.compare(true, true)); in test_compare() 32 assertEquals(0, Boolean.compare(false, false)); in test_compare() 33 assertTrue(Boolean.compare(false, true) < 0); in test_compare() 34 assertTrue(Boolean.compare(true, false) > 0); in test_compare()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Comparator.java | 150 int compare(T o1, T o2); in compare() method 216 int res = compare(c1, c2); in thenComparing() 217 return (res != 0) ? res : other.compare(c1, c2); in thenComparing() 436 (c1, c2) -> keyComparator.compare(keyExtractor.apply(c1), in comparing() 490 (c1, c2) -> Integer.compare(keyExtractor.applyAsInt(c1), keyExtractor.applyAsInt(c2)); in comparingInt() 511 (c1, c2) -> Long.compare(keyExtractor.applyAsLong(c1), keyExtractor.applyAsLong(c2)); in comparingLong() 532 … (c1, c2) -> Double.compare(keyExtractor.applyAsDouble(c1), keyExtractor.applyAsDouble(c2)); in comparingDouble()
|
D | Comparators.java | 51 public int compare(Comparable<Object> c1, Comparable<Object> c2) { in compare() method in Comparators.NaturalOrderComparator 77 public int compare(T a, T b) { in compare() method in Comparators.NullComparator 83 return (real == null) ? 0 : real.compare(a, b); in compare()
|
D | TimSort.java | 296 if (c.compare(pivot, a[mid]) < 0) in binarySort() 355 if (c.compare(a[runHi++], a[lo]) < 0) { // Descending in countRunAndMakeAscending() 356 while (runHi < hi && c.compare(a[runHi], a[runHi - 1]) < 0) in countRunAndMakeAscending() 360 while (runHi < hi && c.compare(a[runHi], a[runHi - 1]) >= 0) in countRunAndMakeAscending() 542 if (c.compare(key, a[base + hint]) > 0) { in gallopLeft() 545 while (ofs < maxOfs && c.compare(key, a[base + hint + ofs]) > 0) { in gallopLeft() 560 while (ofs < maxOfs && c.compare(key, a[base + hint - ofs]) <= 0) { in gallopLeft() 585 if (c.compare(key, a[base + m]) > 0) in gallopLeft() 613 if (c.compare(key, a[base + hint]) < 0) { in gallopRight() 616 while (ofs < maxOfs && c.compare(key, a[base + hint - ofs]) < 0) { in gallopRight() [all …]
|
D | Objects.java | 182 public static <T> int compare(T a, T b, Comparator<? super T> c) { in compare() method in Objects 183 return (a == b) ? 0 : c.compare(a, b); in compare()
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | MinMaxTest.java | 55 assertTrue(!countTo(0).stream().min(Integer::compare).isPresent()); in testMinMax() 56 assertTrue(!countTo(0).stream().max(Integer::compare).isPresent()); in testMinMax() 57 assertEquals(1, (int) countTo(1000).stream().min(Integer::compare).get()); in testMinMax() 58 assertEquals(1000, (int) countTo(1000).stream().max(Integer::compare).get()); in testMinMax() 63 exerciseTerminalOps(data, s -> s.min(Integer::compare)); in testOps() 64 exerciseTerminalOps(data, s -> s.max(Integer::compare)); in testOps()
|
/libcore/ojluni/src/main/java/java/util/function/ |
D | BinaryOperator.java | 59 return (a, b) -> comparator.compare(a, b) <= 0 ? a : b; in minBy() 74 return (a, b) -> comparator.compare(a, b) >= 0 ? a : b; in maxBy()
|
/libcore/ojluni/src/main/java/java/text/ |
D | Collator.java | 258 public abstract int compare(String source, String target); in compare() method in Collator 276 public int compare(Object o1, Object o2) { in compare() method in Collator 277 return compare((String)o1, (String)o2); in compare() 305 return (compare(source, target) == 0); in equals()
|
D | RuleBasedCollator.java | 362 public synchronized int compare(String source, String target) in compare() method in RuleBasedCollator 368 return icuColl.compare(source, target); in compare()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | ObjectsTest.java | 29 assertEquals(0, Objects.compare(null, null, String.CASE_INSENSITIVE_ORDER)); in test_compare() 30 assertEquals(0, Objects.compare("a", "A", String.CASE_INSENSITIVE_ORDER)); in test_compare() 31 assertEquals(-1, Objects.compare("a", "b", String.CASE_INSENSITIVE_ORDER)); in test_compare() 32 assertEquals(1, Objects.compare("b", "a", String.CASE_INSENSITIVE_ORDER)); in test_compare()
|
D | OldPriorityQueueTest.java | 87 public int compare(String object1, String object2) { in compare() method in OldPriorityQueueTest.MockComparatorStringByLength 103 public int compare(E object1, E object2) { in compare() method in OldPriorityQueueTest.MockComparatorCast
|
/libcore/luni/src/test/java/libcore/libcore/icu/ |
D | ICUTest.java | 215 assertTrue(c.compare("2", "11") < 0); in testScriptsPassedToIcu() 216 assertTrue(c.compare("11", "ae") < 0); in testScriptsPassedToIcu() 217 assertTrue(c.compare("ae", "Ä") < 0); in testScriptsPassedToIcu() 218 assertTrue(c.compare("Ä", "ä") < 0); in testScriptsPassedToIcu() 219 assertTrue(c.compare("ä", "AF") < 0); in testScriptsPassedToIcu() 220 assertTrue(c.compare("AF", "af") < 0); in testScriptsPassedToIcu()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | RefSortedMap.java | 101 if (hasStart && hasEnd && compare(start, end) >= 0) { in SubMap() 229 if (hasStart && compare(key, start) < 0) { 232 if (hasEnd && compare(key, end) >= 0) { 245 public int compare(K start, K end) { 246 return comparator != null ? comparator.compare(start, end) 360 public int compare(MapEntry<K, V> arg0, MapEntry<K, V> arg1) { 361 return RefSortedMap.this.compare(arg0.getKey(), arg1.getKey());
|
/libcore/ojluni/annotations/hiddenapi/java/text/ |
D | Collator.java | 64 public abstract int compare(java.lang.String source, java.lang.String target); in compare() method in Collator 66 public int compare(java.lang.Object o1, java.lang.Object o2) { in compare() method in Collator
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Boolean.java | 273 return compare(this.value, b.value); in compareTo() 290 public static int compare(boolean x, boolean y) { in compare() method in Boolean
|
/libcore/tools/upstream/ |
D | Android.bp | 20 name: "libcore-compare-upstreams", 22 manifest: "src/main/libcore-compare-upstreams.mf",
|
/libcore/luni/src/main/java/javax/xml/datatype/ |
D | Duration.java | 762 public abstract int compare(final Duration duration); in compare() method in Duration 791 return compare(duration) == DatatypeConstants.GREATER; in isLongerThan() 813 return compare(duration) == DatatypeConstants.LESSER; in isShorterThan() 858 return compare((Duration) duration) == DatatypeConstants.EQUAL; in equals()
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | ByteArrayTagOrder.java | 54 public final int compare(byte[] bytes1, byte[] bytes2) { in compare() method in ByteArrayTagOrder
|
/libcore/ojluni/src/main/java/java/nio/file/attribute/ |
D | FileTime.java | 340 return Long.compare(value, other.value); in compareTo() 345 int cmp = Long.compare(secs, secsOther); in compareTo() 349 cmp = Long.compare(toInstant().getNano(), other.toInstant().getNano()); in compareTo() 362 return Long.compare(toExcessNanos(days), other.toExcessNanos(daysOther)); in compareTo() 364 return Long.compare(days, daysOther); in compareTo()
|