Searched defs:compare (Results 1 - 25 of 31) sorted by relevance

12

/libcore/dex/src/main/java/com/android/dex/util/
H A DUnsigned.java25 public static int compare(short ushortA, short ushortB) { method in class:Unsigned
34 public static int compare(int uintA, int uintB) { method in class:Unsigned
/libcore/luni/src/main/java/java/util/
H A DComparator.java21 * 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 DObjects.java29 * Returns 0 if {@code a == b}, or {@code c.compare(a, b)} otherwise.
32 public static <T> int compare(T a, T b, Comparator<? super T> c) { method in class:Objects
36 return c.compare(a, b);
H A DPriorityQueue.java353 private int compare(E o1, E o2) { method in class:PriorityQueue
355 return comparator.compare(o1, o2);
366 if (compare(parent, target) <= 0) {
380 && compare(elements[childIndex + 1], elements[childIndex]) < 0) {
383 if (compare(target, elements[childIndex]) <= 0) {
/libcore/luni/src/main/java/java/text/
H A DRuleBasedCollator.java131 * 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.
H A DCollator.java78 * if (usCollator.compare(&quot;abc&quot;, &quot;ABC&quot;) == 0) {
85 * The following example shows how to compare two strings using the collator for
93 * if (myCollator.compare(&quot;\u00e0\u0325&quot;, &quot;a\u0325\u0300&quot;) != 0) {
96 * if (myCollator.compare(&quot;\u00e0\u0325&quot;, &quot;a\u0325\u0300&quot;) != 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...]
/libcore/luni/src/main/java/org/apache/harmony/security/x501/
H A DAttributeTypeAndValueComparator.java47 public int compare(Object obj1, Object obj2) { method in class:AttributeTypeAndValueComparator
/libcore/luni/src/test/java/libcore/java/util/
H A DOldPriorityQueueTest.java86 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 DOldTreeMapTest.java36 public int compare(Object o1, Object o2) { method in class:OldTreeMapTest.ReversedComparator
49 public int compare(T o1, T o2) { method in class:OldTreeMapTest.MockComparator
65 public int compare(String o1, String o2) { method in class:OldTreeMapTest.MockComparatorNullTolerable
267 public int compare(String o1, String o2) {
332 * there's no other element to compare it to. This is more strict than the
/libcore/luni/src/main/java/java/lang/
H A DBoolean.java99 * the object to compare this boolean with.
114 * the boolean object to compare this object to.
124 return compare(value, that.value);
133 public static int compare(boolean lhs, boolean rhs) { method in class:Boolean
H A DByte.java100 * the byte object to compare this object to.
109 return compare(value, object.value);
117 public static int compare(byte lhs, byte rhs) { method in class:Byte
153 * the object to compare this byte with.
H A DShort.java97 * the short object to compare this object to.
108 return compare(value, object.value);
116 public static int compare(short lhs, short rhs) { method in class:Short
153 * the object to compare this short with.
H A DDouble.java149 * the double object to compare this object to.
160 return compare(value, object.value);
172 * representation ({@code 0x7ff8000000000000L}) (compare to {@link #doubleToRawLongBits}).
179 * {@code value}. <em>Not-a-Number (NaN)</em> values are preserved (compare
199 * <p>Note that, unlike {@code ==}, {@code -0.0} and {@code +0.0} compare
200 * unequal, and {@code NaN}s compare equal by this method.
203 * the object to compare this double with.
344 * the first value to compare.
346 * the second value to compare.
351 public static int compare(doubl method in class:Double
[all...]
H A DFloat.java155 * the float object to compare this object to.
164 return compare(value, object.value);
182 * <p>Note that, unlike {@code ==}, {@code -0.0} and {@code +0.0} compare
183 * unequal, and {@code NaN}s compare equal by this method.
186 * the object to compare this float with.
200 * representation ({@code 0x7fc00000}) (compare to {@link #floatToRawIntBits}).
207 * float {@code value}. <em>Not-a-Number (NaN)</em> values are preserved (compare
349 * the first value to compare.
351 * the second value to compare.
357 public static int compare(floa method in class:Float
[all...]
H A DInteger.java115 * the integer object to compare this object to.
124 return compare(value, object.value);
132 public static int compare(int lhs, int rhs) { method in class:Integer
202 * the object to compare this integer with.
H A DLong.java102 * the long object to compare this object to.
111 return compare(value, object.value);
119 public static int compare(long lhs, long rhs) { method in class:Long
190 * the object to compare this long with.
/libcore/support/src/test/java/tests/support/
H A DSupport_Format.java65 + format.format(object), compare(results, expectedResults));
71 protected static boolean compare(Vector<FieldContainer> vector1, Vector<FieldContainer> vector2) { method in class:Support_Format
/libcore/luni/src/main/java/javax/xml/datatype/
H A DDuration.java57 * 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;
H A DXMLGregorianCalendar.java160 * <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.
/libcore/luni/src/main/java/libcore/icu/
H A DNativeCollation.java24 public static native int compare(long address, String source, String target); method in class:NativeCollation
H A DRuleBasedCollatorICU.java66 public int compare(String source, String target) { method in class:RuleBasedCollatorICU
67 return NativeCollation.compare(address, source, target);
131 return (compare(source, target) == 0);
/libcore/luni/src/test/java/libcore/java/text/
H A DOldDecimalFormatTest.java600 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/libart/src/main/java/java/lang/
H A DString.java79 * an Object to compare
81 * an Object to compare
88 public int compare(String o1, String o2) { method in class:String.CaseInsensitiveComparator
553 * the string to compare.
575 * the string to compare.
676 * the object to compare.
722 * the string to compare.
1185 * the string to compare.
1189 * the number of characters to compare.
1229 * the string to compare
[all...]
/libcore/libdvm/src/main/java/java/lang/
H A DString.java79 * an Object to compare
81 * an Object to compare
88 public int compare(String o1, String o2) { method in class:String.CaseInsensitiveComparator
622 * the string to compare.
644 * the string to compare.
745 * the object to compare.
757 * the string to compare.
1220 * the string to compare.
1224 * the number of characters to compare.
1264 * the string to compare
[all...]
/libcore/luni/src/test/java/tests/api/java/util/
H A DCollectionsTest.java68 public int compare(Object o1, Object o2) { method in class:CollectionsTest.ReversedMyIntComparator

Completed in 6035 milliseconds

12