/libcore/luni/src/test/java/libcore/java/lang/ |
H A D | ByteTest.java | 24 assertTrue(Byte.compare(max, max) == 0); 25 assertTrue(Byte.compare(min, min) == 0); 26 assertTrue(Byte.compare(zero, zero) == 0); 27 assertTrue(Byte.compare(max, zero) > 0); 28 assertTrue(Byte.compare(max, min) > 0); 29 assertTrue(Byte.compare(zero, max) < 0); 30 assertTrue(Byte.compare(zero, min) > 0); 31 assertTrue(Byte.compare(min, zero) < 0); 32 assertTrue(Byte.compare(min, max) < 0);
|
H A D | IntegerTest.java | 24 assertTrue(Integer.compare(max, max) == 0); 25 assertTrue(Integer.compare(min, min) == 0); 26 assertTrue(Integer.compare(zero, zero) == 0); 27 assertTrue(Integer.compare(max, zero) > 0); 28 assertTrue(Integer.compare(max, min) > 0); 29 assertTrue(Integer.compare(zero, max) < 0); 30 assertTrue(Integer.compare(zero, min) > 0); 31 assertTrue(Integer.compare(min, zero) < 0); 32 assertTrue(Integer.compare(min, max) < 0);
|
H A D | ShortTest.java | 24 assertTrue(Short.compare(max, max) == 0); 25 assertTrue(Short.compare(min, min) == 0); 26 assertTrue(Short.compare(zero, zero) == 0); 27 assertTrue(Short.compare(max, zero) > 0); 28 assertTrue(Short.compare(max, min) > 0); 29 assertTrue(Short.compare(zero, max) < 0); 30 assertTrue(Short.compare(zero, min) > 0); 31 assertTrue(Short.compare(min, zero) < 0); 32 assertTrue(Short.compare(min, max) < 0);
|
H A D | BooleanTest.java | 31 assertEquals(0, Boolean.compare(true, true)); 32 assertEquals(0, Boolean.compare(false, false)); 33 assertTrue(Boolean.compare(false, true) < 0); 34 assertTrue(Boolean.compare(true, false) > 0);
|
H A D | LongTest.java | 24 assertTrue(Long.compare(max, max) == 0); 25 assertTrue(Long.compare(min, min) == 0); 26 assertTrue(Long.compare(zero, zero) == 0); 27 assertTrue(Long.compare(max, zero) > 0); 28 assertTrue(Long.compare(max, min) > 0); 29 assertTrue(Long.compare(zero, max) < 0); 30 assertTrue(Long.compare(zero, min) > 0); 31 assertTrue(Long.compare(min, zero) < 0); 32 assertTrue(Long.compare(min, max) < 0);
|
H A D | CharacterTest.java | 110 assertEquals(0, Character.compare('a', 'a')); 111 assertTrue(Character.compare('a', 'b') < 0); 112 assertTrue(Character.compare('b', 'a') > 0);
|
/libcore/luni/src/main/java/java/util/ |
H A D | Comparator.java | 21 * A {@code Comparator} is used to compare two objects to determine their ordering with 24 * to be <i>consistent with equals</i>, its {code #compare(Object, Object)} 38 * <li>{@code compare(a,a)} returns zero for all {@code a}</li> 39 * <li>the sign of {@code compare(a,b)} must be the opposite of the sign of {@code 40 * compare(b,a)} for all pairs of (a,b)</li> 41 * <li>From {@code compare(a,b) > 0} and {@code compare(b,c) > 0} it must 42 * follow {@code compare(a,c) > 0} for all possible combinations of {@code 49 * a second {@code Object} to compare with {@code lhs}. 55 public int compare( method in interface:Comparator [all...] |
H A D | TimSort.java | 261 if (c.compare(pivot, a[mid]) < 0) 320 if (c.compare(a[runHi++], a[lo]) < 0) { // Descending 321 while(runHi < hi && c.compare(a[runHi], a[runHi - 1]) < 0) 325 while (runHi < hi && c.compare(a[runHi], a[runHi - 1]) >= 0) 507 if (c.compare(key, a[base + hint]) > 0) { 510 while (ofs < maxOfs && c.compare(key, a[base + hint + ofs]) > 0) { 525 while (ofs < maxOfs && c.compare(key, a[base + hint - ofs]) <= 0) { 550 if (c.compare(key, a[base + m]) > 0) 578 if (c.compare(key, a[base + hint]) < 0) { 581 while (ofs < maxOfs && c.compare(ke [all...] |
H A D | PriorityQueue.java | 349 private int compare(E o1, E o2) { method in class:PriorityQueue 351 return comparator.compare(o1, o2); 362 if (compare(parent, target) <= 0) { 376 && compare(elements[childIndex + 1], elements[childIndex]) < 0) { 379 if (compare(target, elements[childIndex]) <= 0) {
|
H A D | TreeSet.java | 171 * Returns the comparator used to compare elements in this {@code TreeSet}. 358 int compare = (c == null) ? ((Comparable<E>) start).compareTo(end) : c 359 .compare(start, end); 360 if (compare <= 0) { 380 c.compare(end, end); 398 c.compare(start, start);
|
/libcore/luni/src/test/java/libcore/java/text/ |
H A D | OldDecimalFormatTest.java | 600 private void compare(String testName, String format, String expected) { method in class:OldDecimalFormatTest 605 private boolean compare(int count, String format, String expected) { method in class:OldDecimalFormatTest 624 compare("00.0#E0: 0.0", df.format(0.0), "00.0E0"); 625 compare("00.0#E0: 1.0", df.format(1.0), "10.0E-1"); 626 compare("00.0#E0: 12.0", df.format(12.0), "12.0E0"); 627 compare("00.0#E0: 123.0", df.format(123.0), "12.3E1"); 628 compare("00.0#E0: 1234.0", df.format(1234.0), "12.34E2"); 629 compare("00.0#E0: 12346.0", df.format(12346.0), "12.35E3"); 630 compare("00.0#E0: 99999.0", df.format(99999.0), "10.0E4"); 631 compare("00. [all...] |
/libcore/luni/src/main/java/java/text/ |
H A D | Collator.java | 78 * if (usCollator.compare("abc", "ABC") == 0) { 85 * The following example shows how to compare two strings using the collator for 93 * if (myCollator.compare("\u00e0\u0325", "a\u0325\u0300") != 0) { 96 * if (myCollator.compare("\u00e0\u0325", "a\u0325\u0300") != 0) { 184 * the first string to compare. 186 * the second string to compare. 193 public int compare(Object object1, Object object2) { method in class:Collator 194 return compare((String) object1, (String) object2); 201 * the first string to compare. 203 * the second string to compare 208 public abstract int compare(String string1, String string2); method in class:Collator [all...] |
H A D | RuleBasedCollator.java | 131 * This allows you to use a RuleBasedCollator to compare accented strings even 376 * {@code RuleBasedCollator.compare(String, String)} has better performance. 387 public int compare(String source, String target) { method in class:RuleBasedCollator 393 return icuColl.compare(source, target); 420 * the object to compare with this object.
|
/libcore/luni/src/test/java/tests/api/java/lang/ |
H A D | StringTest.java | 47 assertTrue(String.CASE_INSENSITIVE_ORDER.compare(s1, s2) == 0);
|
/libcore/luni/src/test/java/tests/java/lang/String/ |
H A D | Tests.java | 46 assertTrue(String.CASE_INSENSITIVE_ORDER.compare(s1, s2) == 0);
|
/libcore/luni/src/main/java/java/lang/ |
H A D | Boolean.java | 99 * the object to compare this boolean with. 114 * the boolean object to compare this object to. 124 return compare(value, that.value); 134 public static int compare(boolean lhs, boolean rhs) { method in class:Boolean
|
H A D | Byte.java | 100 * the byte object to compare this object to. 109 return compare(value, object.value); 118 public static int compare(byte lhs, byte rhs) { method in class:Byte 154 * the object to compare this byte with.
|
H A D | Short.java | 97 * the short object to compare this object to. 108 return compare(value, object.value); 117 public static int compare(long lhs, long rhs) { method in class:Short 154 * the object to compare this short with.
|
/libcore/luni/src/main/java/libcore/icu/ |
H A D | RuleBasedCollatorICU.java | 66 public int compare(String source, String target) { method in class:RuleBasedCollatorICU 67 return NativeCollation.compare(address, source, target); 131 return (compare(source, target) == 0);
|
H A D | NativeCollation.java | 24 public static native int compare(int address, String source, String target); method in class:NativeCollation
|
/libcore/luni/src/test/java/libcore/java/util/ |
H A D | OldPriorityQueueTest.java | 86 public int compare(String object1, String object2) { method in class:OldPriorityQueueTest.MockComparatorStringByLength 102 public int compare(E object1, E object2) { method in class:OldPriorityQueueTest.MockComparatorCast
|
H A D | TreeSetTest.java | 44 assertEquals(0, deserialized.comparator().compare("X", "x")); 132 assertEquals(0, deserialized.comparator().compare("X", "x"));
|
/libcore/luni/src/main/java/javax/xml/datatype/ |
H A D | XMLGregorianCalendar.java | 160 * <li>partial order relation comparator method, {@link #compare(XMLGregorianCalendar xmlGregorianCalendar)}</li> 161 * <li>{@link #equals(Object)} defined relative to {@link #compare(XMLGregorianCalendar xmlGregorianCalendar)}.</li> 631 * @param xmlGregorianCalendar Instance of <code>XMLGregorianCalendar</code> to compare 642 public abstract int compare(XMLGregorianCalendar xmlGregorianCalendar); method in class:XMLGregorianCalendar 657 * @param obj to compare. 660 * and {@link #compare(XMLGregorianCalendar obj)} returns {@link DatatypeConstants#EQUAL}, otherwise <code>false</code>. 667 return compare((XMLGregorianCalendar) obj) == DatatypeConstants.EQUAL; 679 // Following two dates compare to EQUALS since in different timezones.
|
H A D | Duration.java | 57 * The {@link #compare(Duration duration)} method implements this 747 * @param duration to compare 762 public abstract int compare(final Duration duration); method in class:Duration 788 * @see #compare(Duration duration) 791 return compare(duration) == DatatypeConstants.GREATER; 810 * @see #compare(Duration duration) 813 return compare(duration) == DatatypeConstants.LESSER; 851 * @see #compare(Duration duration) 858 return compare((Duration) duration) == DatatypeConstants.EQUAL;
|
/libcore/luni/src/main/java/org/apache/harmony/security/x501/ |
H A D | AttributeTypeAndValueComparator.java | 47 public int compare(Object obj1, Object obj2) { method in class:AttributeTypeAndValueComparator
|